Commit eb857aeb authored by Alexandre Julliard's avatar Alexandre Julliard

user32: Moved the menu activation hack on managed windows to the X11 driver.

parent fa677c7f
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment