mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 12:49:45 +00:00
user32: Moved the menu activation hack on managed windows to the X11 driver.
This commit is contained in:
parent
fa677c7f72
commit
eb857aebeb
@ -3365,13 +3365,7 @@ void MENU_TrackKbdMenuBar( HWND hwnd, UINT wParam, WCHAR wChar)
|
||||
|
||||
MENU_SelectItem( hwnd, hTrackMenu, uItem, TRUE, 0 );
|
||||
|
||||
if (wParam & HTSYSMENU && wChar != ' ')
|
||||
{
|
||||
/* prevent sysmenu activation for managed windows on Alt down/up */
|
||||
if (GetPropA( hwnd, "__wine_x11_managed" ))
|
||||
wFlags |= TF_ENDMENU; /* schedule end of menu tracking */
|
||||
}
|
||||
else
|
||||
if (!(wParam & HTSYSMENU) || wChar == ' ')
|
||||
{
|
||||
if( uItem == NO_SELECTED_ITEM )
|
||||
MENU_MoveSelection( hwnd, hTrackMenu, ITEM_NEXT );
|
||||
|
@ -752,6 +752,15 @@ LRESULT X11DRV_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam )
|
||||
}
|
||||
break;
|
||||
|
||||
case SC_KEYMENU:
|
||||
/* prevent a simple ALT press+release from activating the system menu,
|
||||
* as that can get confusing on managed windows */
|
||||
if ((WCHAR)lparam) return -1; /* got an explicit char */
|
||||
if (GetMenu( hwnd )) return -1; /* window has a real menu */
|
||||
if (!(GetWindowLongW( hwnd, GWL_STYLE ) & WS_SYSMENU)) return -1; /* no system menu */
|
||||
TRACE( "ignoring SC_KEYMENU wp %lx lp %lx\n", wparam, lparam );
|
||||
return 0;
|
||||
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user