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
b200793d
Commit
b200793d
authored
May 23, 2000
by
Rob Farnum
Committed by
Alexandre Julliard
May 23, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Post a WM_CANCELMODE message to wake up the internal menu handling
code. This fixes the problem of a menu being orphaned when the parent window disappears, or if the parent loses focus.
parent
410617fe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
5 deletions
+25
-5
menu.c
controls/menu.c
+25
-5
No files found.
controls/menu.c
View file @
b200793d
...
@@ -2725,6 +2725,19 @@ static INT MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y,
...
@@ -2725,6 +2725,19 @@ static INT MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y,
if
(
!
MSG_InternalGetMessage
(
QMSG_WIN32A
,
&
msg
,
msg
.
hwnd
,
mt
.
hOwnerWnd
,
if
(
!
MSG_InternalGetMessage
(
QMSG_WIN32A
,
&
msg
,
msg
.
hwnd
,
mt
.
hOwnerWnd
,
MSGF_MENU
,
PM_NOREMOVE
,
!
enterIdleSent
,
&
enterIdleSent
))
break
;
MSGF_MENU
,
PM_NOREMOVE
,
!
enterIdleSent
,
&
enterIdleSent
))
break
;
/* check if EndMenu() tried to cancel us, by posting this message */
if
(
msg
.
message
==
WM_CANCELMODE
)
{
/* we are now out of the loop */
fEndMenu
=
TRUE
;
/* remove the message from the queue */
PeekMessageA
(
&
msg
,
0
,
msg
.
message
,
msg
.
message
,
PM_REMOVE
);
/* break out of internal loop, ala ESCAPE */
break
;
}
TranslateMessage
(
&
msg
);
TranslateMessage
(
&
msg
);
mt
.
pt
=
msg
.
pt
;
mt
.
pt
=
msg
.
pt
;
...
@@ -4157,11 +4170,18 @@ BOOL WINAPI DrawMenuBar( HWND hWnd )
...
@@ -4157,11 +4170,18 @@ BOOL WINAPI DrawMenuBar( HWND hWnd )
*/
*/
void
WINAPI
EndMenu
(
void
)
void
WINAPI
EndMenu
(
void
)
{
{
/*
/* if we are in the menu code, and it is active */
* FIXME: NOT ENOUGH! This has to cancel menu tracking right away.
if
(
fEndMenu
==
FALSE
&&
MENU_IsMenuActive
())
*/
{
/* terminate the menu handling code */
fEndMenu
=
TRUE
;
fEndMenu
=
TRUE
;
/* needs to be posted to wakeup the internal menu handler */
/* which will now terminate the menu, in the event that */
/* the main window was minimized, or lost focus, so we */
/* don't end up with an orphaned menu */
PostMessageA
(
pTopPopupWnd
->
hwndSelf
,
WM_CANCELMODE
,
0
,
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