Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
4dd29618
Commit
4dd29618
authored
Sep 21, 2004
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Sep 21, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix WM_MDIREFRESHMENU for the case when separator is at the position
0.
parent
0af18186
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
16 deletions
+19
-16
mdi.c
windows/mdi.c
+19
-16
No files found.
windows/mdi.c
View file @
4dd29618
...
@@ -296,10 +296,13 @@ static LRESULT MDISetMenu( HWND hwnd, HMENU hmenuFrame,
...
@@ -296,10 +296,13 @@ static LRESULT MDISetMenu( HWND hwnd, HMENU hmenuFrame,
if
(
!
(
ci
=
get_client_info
(
hwnd
)))
return
0
;
if
(
!
(
ci
=
get_client_info
(
hwnd
)))
return
0
;
if
(
hmenuFrame
==
ci
->
hFrameMenu
)
return
(
LRESULT
)
hmenuFrame
;
if
(
hmenuFrame
)
{
if
(
hmenuFrame
==
ci
->
hFrameMenu
)
return
(
LRESULT
)
hmenuFrame
;
if
(
IsZoomed
(
ci
->
hwndActiveChild
)
&&
hmenuFrame
&&
hmenuFrame
!=
ci
->
hFrameMenu
)
if
(
IsZoomed
(
ci
->
hwndActiveChild
)
&&
hmenuFrame
!=
ci
->
hFrameMenu
)
MDI_RestoreFrameMenu
(
hwndFrame
,
ci
->
hwndActiveChild
);
MDI_RestoreFrameMenu
(
hwndFrame
,
ci
->
hwndActiveChild
);
}
if
(
hmenuWindow
&&
hmenuWindow
!=
ci
->
hWindowMenu
)
if
(
hmenuWindow
&&
hmenuWindow
!=
ci
->
hWindowMenu
)
{
{
...
@@ -358,7 +361,7 @@ static LRESULT MDISetMenu( HWND hwnd, HMENU hmenuFrame,
...
@@ -358,7 +361,7 @@ static LRESULT MDISetMenu( HWND hwnd, HMENU hmenuFrame,
*/
*/
static
LRESULT
MDI_RefreshMenu
(
MDICLIENTINFO
*
ci
)
static
LRESULT
MDI_RefreshMenu
(
MDICLIENTINFO
*
ci
)
{
{
UINT
i
,
count
,
visible
,
separator_pos
,
id
;
UINT
i
,
count
,
visible
,
id
;
WCHAR
buf
[
MDI_MAXTITLELENGTH
];
WCHAR
buf
[
MDI_MAXTITLELENGTH
];
TRACE
(
"children %u, window menu %p
\n
"
,
ci
->
nActiveChildren
,
ci
->
hWindowMenu
);
TRACE
(
"children %u, window menu %p
\n
"
,
ci
->
nActiveChildren
,
ci
->
hWindowMenu
);
...
@@ -376,8 +379,6 @@ static LRESULT MDI_RefreshMenu(MDICLIENTINFO *ci)
...
@@ -376,8 +379,6 @@ static LRESULT MDI_RefreshMenu(MDICLIENTINFO *ci)
* there is a menu item with MDI magic ID removes all existing
* there is a menu item with MDI magic ID removes all existing
* menu items after it, and then adds visible MDI children.
* menu items after it, and then adds visible MDI children.
*/
*/
id
=
(
UINT
)
-
1
;
separator_pos
=
0
;
count
=
GetMenuItemCount
(
ci
->
hWindowMenu
);
count
=
GetMenuItemCount
(
ci
->
hWindowMenu
);
for
(
i
=
0
;
i
<
count
;
i
++
)
for
(
i
=
0
;
i
<
count
;
i
++
)
{
{
...
@@ -390,24 +391,25 @@ static LRESULT MDI_RefreshMenu(MDICLIENTINFO *ci)
...
@@ -390,24 +391,25 @@ static LRESULT MDI_RefreshMenu(MDICLIENTINFO *ci)
{
{
if
(
mii
.
fType
&
MF_SEPARATOR
)
if
(
mii
.
fType
&
MF_SEPARATOR
)
{
{
separator_pos
=
i
;
/* Windows checks only ID of the menu item */
/* Windows checks only ID of the menu item */
memset
(
&
mii
,
0
,
sizeof
(
mii
));
memset
(
&
mii
,
0
,
sizeof
(
mii
));
mii
.
cbSize
=
sizeof
(
mii
);
mii
.
cbSize
=
sizeof
(
mii
);
mii
.
fMask
=
MIIM_ID
;
mii
.
fMask
=
MIIM_ID
;
if
(
GetMenuItemInfoW
(
ci
->
hWindowMenu
,
i
+
1
,
TRUE
,
&
mii
))
if
(
GetMenuItemInfoW
(
ci
->
hWindowMenu
,
i
+
1
,
TRUE
,
&
mii
))
id
=
mii
.
wID
;
{
if
(
mii
.
wID
==
ci
->
idFirstChild
)
{
TRACE
(
"removing %u items including separator
\n
"
,
count
-
i
);
while
(
RemoveMenu
(
ci
->
hWindowMenu
,
i
,
MF_BYPOSITION
))
/* nothing */
;
break
;
}
}
}
}
}
}
}
}
if
(
separator_pos
&&
id
==
ci
->
idFirstChild
)
{
for
(
i
=
separator_pos
;
i
<
count
;
i
++
)
RemoveMenu
(
ci
->
hWindowMenu
,
separator_pos
,
MF_BYPOSITION
);
}
visible
=
0
;
visible
=
0
;
for
(
i
=
0
;
i
<
ci
->
nActiveChildren
;
i
++
)
for
(
i
=
0
;
i
<
ci
->
nActiveChildren
;
i
++
)
{
{
...
@@ -1022,7 +1024,8 @@ static LRESULT MDIClientWndProc_common( HWND hwnd, UINT message,
...
@@ -1022,7 +1024,8 @@ static LRESULT MDIClientWndProc_common( HWND hwnd, UINT message,
if
(
!
hBmpClose
)
hBmpClose
=
CreateMDIMenuBitmap
();
if
(
!
hBmpClose
)
hBmpClose
=
CreateMDIMenuBitmap
();
TRACE
(
"Client created - hwnd = %p, idFirst = %u
\n
"
,
hwnd
,
ci
->
idFirstChild
);
TRACE
(
"Client created: hwnd %p, Window menu %p, idFirst = %u
\n
"
,
hwnd
,
ci
->
hWindowMenu
,
ci
->
idFirstChild
);
return
0
;
return
0
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment