Re: [PATCH v3] user32: Don't send WM_CHAR when a menu gets VK_ESCAPE and add tests
Fabian Maurer <dark.shadow4(a)web.de> writes:
diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c index 59fcd9c488..a4d59713c9 100644 --- a/dlls/user32/menu.c +++ b/dlls/user32/menu.c @@ -3077,7 +3077,9 @@ static BOOL MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y, break; }
- TranslateMessage( &msg ); + /* Don't translate escape-keydown message because it leads to an unexpected WM_CHAR */ + if( !(msg.message == WM_KEYDOWN && msg.wParam == VK_ESCAPE) ) + TranslateMessage( &msg ); mt.pt = msg.pt;
You could do it like that, but I think it would be cleaner to move this into the part that checks keyboard messages, and call TranslateMessage for messages that have not been handled otherwise. -- Alexandre Julliard julliard(a)winehq.org
participants (1)
-
Alexandre Julliard