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
f12c5bfc
Commit
f12c5bfc
authored
Jan 26, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Use a finally handler to make sure capture is always released when exiting the menu loop.
parent
58010a97
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
menu.c
dlls/user32/menu.c
+8
-3
No files found.
dlls/user32/menu.c
View file @
f12c5bfc
...
...
@@ -56,6 +56,7 @@
#include "wownt32.h"
#include "wine/server.h"
#include "wine/unicode.h"
#include "wine/exception.h"
#include "win.h"
#include "controls.h"
#include "user_private.h"
...
...
@@ -2964,6 +2965,11 @@ static void MENU_KeyRight( MTRACKER* pmt, UINT wFlags )
}
}
static
void
CALLBACK
release_capture
(
BOOL
__normal
)
{
set_capture_window
(
0
,
GUI_INMENUMODE
,
NULL
);
}
/***********************************************************************
* MENU_TrackMenu
*
...
...
@@ -3011,7 +3017,7 @@ static BOOL MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y,
capture_win
=
(
wFlags
&
TPM_POPUPMENU
)
?
menu
->
hWnd
:
mt
.
hOwnerWnd
;
set_capture_window
(
capture_win
,
GUI_INMENUMODE
,
NULL
);
while
(
!
fEndMenu
)
__TRY
while
(
!
fEndMenu
)
{
menu
=
MENU_GetMenu
(
mt
.
hCurrentMenu
);
if
(
!
menu
)
/* sometimes happens if I do a window manager close */
...
...
@@ -3232,8 +3238,7 @@ static BOOL MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y,
PeekMessageW
(
&
msg
,
0
,
msg
.
message
,
msg
.
message
,
PM_REMOVE
);
else
mt
.
trackFlags
&=
~
TF_SKIPREMOVE
;
}
set_capture_window
(
0
,
GUI_INMENUMODE
,
NULL
);
__FINALLY
(
release_capture
)
/* If dropdown is still painted and the close box is clicked on
then the menu will be destroyed as part of the DispatchMessage above.
...
...
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