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
a9bff001
Commit
a9bff001
authored
Mar 14, 2016
by
Vincent Povirk
Committed by
Alexandre Julliard
Mar 17, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Set capture earlier on popup menus.
Signed-off-by:
Vincent Povirk
<
vincent@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
05a13fb1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
menu.c
dlls/user32/menu.c
+9
-4
No files found.
dlls/user32/menu.c
View file @
a9bff001
...
...
@@ -3003,7 +3003,6 @@ static BOOL MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y,
INT
executedMenuId
=
-
1
;
MTRACKER
mt
;
BOOL
enterIdleSent
=
FALSE
;
HWND
capture_win
;
mt
.
trackFlags
=
0
;
mt
.
hCurrentMenu
=
hmenu
;
...
...
@@ -3031,9 +3030,8 @@ static BOOL MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y,
if
(
wFlags
&
TF_ENDMENU
)
fEndMenu
=
TRUE
;
/* owner may not be visible when tracking a popup, so use the menu itself */
capture_win
=
(
wFlags
&
TPM_POPUPMENU
)
?
menu
->
hWnd
:
mt
.
hOwnerWnd
;
set_capture_window
(
capture_win
,
GUI_INMENUMODE
,
NULL
);
if
(
!
(
wFlags
&
TPM_POPUPMENU
))
set_capture_window
(
mt
.
hOwnerWnd
,
GUI_INMENUMODE
,
NULL
);
__TRY
while
(
!
fEndMenu
)
{
...
...
@@ -3326,6 +3324,10 @@ static BOOL MENU_InitTracking(HWND hWnd, HMENU hMenu, BOOL bPopup, UINT wFlags)
SendMessageW
(
hWnd
,
WM_SETCURSOR
,
(
WPARAM
)
hWnd
,
HTCAPTION
);
if
(
bPopup
)
/* owner may not be visible when tracking a popup, so use the menu itself */
set_capture_window
(
menu
->
hWnd
,
GUI_INMENUMODE
,
NULL
);
if
(
!
(
wFlags
&
TPM_NONOTIFY
))
{
SendMessageW
(
hWnd
,
WM_INITMENU
,
(
WPARAM
)
hMenu
,
0
);
...
...
@@ -3479,6 +3481,9 @@ BOOL WINAPI TrackPopupMenuEx( HMENU hMenu, UINT wFlags, INT x, INT y,
if
(
MENU_ShowPopup
(
hWnd
,
hMenu
,
0
,
wFlags
,
x
,
y
,
0
,
0
))
ret
=
MENU_TrackMenu
(
hMenu
,
wFlags
|
TPM_POPUPMENU
,
0
,
0
,
hWnd
,
lpTpm
?
&
lpTpm
->
rcExclude
:
NULL
);
set_capture_window
(
0
,
GUI_INMENUMODE
,
NULL
);
MENU_ExitTracking
(
hWnd
,
TRUE
);
if
(
menu
->
hWnd
)
...
...
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