Alex Henrie : user32: Tell MENU_SuspendPopup which message to remove.
Alexandre Julliard
julliard at winehq.org
Tue Dec 6 16:27:45 CST 2016
Module: wine
Branch: master
Commit: 68ca28a8bc3197a09cd3b82d90969f44f844dc2e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=68ca28a8bc3197a09cd3b82d90969f44f844dc2e
Author: Alex Henrie <alexhenrie24 at gmail.com>
Date: Mon Dec 5 21:28:50 2016 -0700
user32: Tell MENU_SuspendPopup which message to remove.
Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user32/menu.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c
index 45ce7f5..59fcd9c 100644
--- a/dlls/user32/menu.c
+++ b/dlls/user32/menu.c
@@ -2806,7 +2806,7 @@ static LRESULT MENU_DoNextMenu( MTRACKER* pmt, UINT vk, UINT wFlags )
* The idea is not to show the popup if the next input message is
* going to hide it anyway.
*/
-static BOOL MENU_SuspendPopup( MTRACKER* pmt, UINT16 uMsg )
+static BOOL MENU_SuspendPopup( MTRACKER* pmt, UINT uMsg )
{
MSG msg;
@@ -2878,7 +2878,7 @@ static BOOL MENU_KeyEscape(MTRACKER* pmt, UINT wFlags)
*
* Handle a VK_LEFT key event in a menu.
*/
-static void MENU_KeyLeft( MTRACKER* pmt, UINT wFlags )
+static void MENU_KeyLeft( MTRACKER* pmt, UINT wFlags, UINT msg )
{
POPUPMENU *menu;
HMENU hmenutmp, hmenuprev;
@@ -2918,7 +2918,7 @@ static void MENU_KeyLeft( MTRACKER* pmt, UINT wFlags )
/* A sublevel menu was displayed - display the next one
* unless there is another displacement coming up */
- if( !MENU_SuspendPopup( pmt, WM_KEYDOWN ) )
+ if( !MENU_SuspendPopup( pmt, msg ) )
pmt->hCurrentMenu = MENU_ShowSubPopup(pmt->hOwnerWnd,
pmt->hTopMenu, TRUE, wFlags);
}
@@ -2931,7 +2931,7 @@ static void MENU_KeyLeft( MTRACKER* pmt, UINT wFlags )
*
* Handle a VK_RIGHT key event in a menu.
*/
-static void MENU_KeyRight( MTRACKER* pmt, UINT wFlags )
+static void MENU_KeyRight( MTRACKER* pmt, UINT wFlags, UINT msg )
{
HMENU hmenutmp;
POPUPMENU *menu = MENU_GetMenu( pmt->hTopMenu );
@@ -2975,7 +2975,7 @@ static void MENU_KeyRight( MTRACKER* pmt, UINT wFlags )
MENU_MoveSelection( pmt->hOwnerWnd, pmt->hTopMenu, ITEM_NEXT );
if( hmenutmp || pmt->trackFlags & TF_SUSPENDPOPUP )
- if( !MENU_SuspendPopup(pmt, WM_KEYDOWN) )
+ if( !MENU_SuspendPopup( pmt, msg ) )
pmt->hCurrentMenu = MENU_ShowSubPopup(pmt->hOwnerWnd,
pmt->hTopMenu, TRUE, wFlags);
}
@@ -3178,11 +3178,11 @@ static BOOL MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y,
break;
case VK_LEFT:
- MENU_KeyLeft( &mt, wFlags );
+ MENU_KeyLeft( &mt, wFlags, msg.message );
break;
case VK_RIGHT:
- MENU_KeyRight( &mt, wFlags );
+ MENU_KeyRight( &mt, wFlags, msg.message );
break;
case VK_ESCAPE:
More information about the wine-cvs
mailing list