mirror of
https://github.com/reactos/wine.git
synced 2025-02-15 10:29:19 +00:00
user32: Make sure we set menu capture to a window that is visible.
This commit is contained in:
parent
78de7e363b
commit
635544e20f
@ -2963,6 +2963,7 @@ 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;
|
||||
@ -2991,7 +2992,9 @@ static BOOL MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y,
|
||||
|
||||
if (wFlags & TF_ENDMENU) fEndMenu = TRUE;
|
||||
|
||||
set_capture_window( mt.hOwnerWnd, GUI_INMENUMODE, NULL );
|
||||
/* 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 );
|
||||
|
||||
while (!fEndMenu)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user