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
f12b70ad
Commit
f12b70ad
authored
May 11, 2000
by
Guy Albertelli
Committed by
Alexandre Julliard
May 11, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revalidate menu handle in mt.hTopMenu after DispatchMessage.
parent
5b60bf02
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
14 deletions
+21
-14
menu.c
controls/menu.c
+21
-14
No files found.
controls/menu.c
View file @
f12b70ad
...
...
@@ -2907,24 +2907,31 @@ static INT MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y,
ReleaseCapture
();
menu
=
MENU_GetMenu
(
mt
.
hTopMenu
);
if
(
IsWindow
(
mt
.
hOwnerWnd
)
)
/* If dropdown is still painted and the close box is clicked on
then the menu will be destroyed as part of the DispatchMessage above.
This will then invalidate the menu handle in mt.hTopMenu. We should
check for this first. */
if
(
IsMenu
(
mt
.
hTopMenu
)
)
{
MENU_HideSubPopups
(
mt
.
hOwnerWnd
,
mt
.
hTopMenu
,
FALSE
);
menu
=
MENU_GetMenu
(
mt
.
hTopMenu
);
if
(
menu
&&
menu
->
wFlags
&
MF_POPUP
)
{
ShowWindow
(
menu
->
hWnd
,
SW_HIDE
);
uSubPWndLevel
=
0
;
}
MENU_SelectItem
(
mt
.
hOwnerWnd
,
mt
.
hTopMenu
,
NO_SELECTED_ITEM
,
FALSE
,
0
);
SendMessageA
(
mt
.
hOwnerWnd
,
WM_MENUSELECT
,
MAKELONG
(
0
,
0xffff
),
0
);
if
(
IsWindow
(
mt
.
hOwnerWnd
)
)
{
MENU_HideSubPopups
(
mt
.
hOwnerWnd
,
mt
.
hTopMenu
,
FALSE
);
if
(
menu
&&
menu
->
wFlags
&
MF_POPUP
)
{
ShowWindow
(
menu
->
hWnd
,
SW_HIDE
);
uSubPWndLevel
=
0
;
}
MENU_SelectItem
(
mt
.
hOwnerWnd
,
mt
.
hTopMenu
,
NO_SELECTED_ITEM
,
FALSE
,
0
);
SendMessageA
(
mt
.
hOwnerWnd
,
WM_MENUSELECT
,
MAKELONG
(
0
,
0xffff
),
0
);
}
/* Reset the variable for hiding menu */
if
(
menu
)
menu
->
bTimeToHide
=
FALSE
;
}
/* Reset the variable for hiding menu */
menu
->
bTimeToHide
=
FALSE
;
/* The return value is only used by TrackPopupMenu */
return
((
executedMenuId
!=
-
1
)
?
executedMenuId
:
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