user32: Fetch the window menu again after sending initialization messages.

This commit is contained in:
Alexandre Julliard 2013-06-27 17:48:30 +02:00
parent b3317c5bec
commit cd4d71e4a2
1 changed files with 6 additions and 0 deletions

View File

@ -3356,6 +3356,9 @@ void MENU_TrackMouseMenuBar( HWND hWnd, INT ht, POINT pt )
if (IsMenu(hMenu))
{
MENU_InitTracking( hWnd, hMenu, FALSE, wFlags );
/* fetch the window menu again, it may have changed */
hMenu = (ht == HTSYSMENU) ? get_win_sys_menu( hWnd ) : GetMenu( hWnd );
MENU_TrackMenu( hMenu, wFlags, pt.x, pt.y, hWnd, NULL );
MENU_ExitTracking(hWnd, FALSE);
}
@ -3396,6 +3399,9 @@ void MENU_TrackKbdMenuBar( HWND hwnd, UINT wParam, WCHAR wChar)
MENU_InitTracking( hwnd, hTrackMenu, FALSE, wFlags );
/* fetch the window menu again, it may have changed */
hTrackMenu = (wParam & HTSYSMENU) ? get_win_sys_menu( hwnd ) : GetMenu( hwnd );
if( wChar && wChar != ' ' )
{
uItem = MENU_FindItemByKey( hwnd, hTrackMenu, wChar, (wParam & HTSYSMENU) );