Nikolay Sivov : user32: Set WM_EXITMENULOOP wParam same way as for WM_ENTERMENULOOP.

Alexandre Julliard julliard at winehq.org
Mon Apr 12 09:54:07 CDT 2010


Module: wine
Branch: master
Commit: 6f0560dfa7b2c4aa2e9eb5f762f08193d4471137
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6f0560dfa7b2c4aa2e9eb5f762f08193d4471137

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Sun Apr 11 23:37:19 2010 +0400

user32: Set WM_EXITMENULOOP wParam same way as for WM_ENTERMENULOOP.

---

 dlls/user32/menu.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c
index f8cc39d..764b7ea 100644
--- a/dlls/user32/menu.c
+++ b/dlls/user32/menu.c
@@ -3292,14 +3292,15 @@ static BOOL MENU_InitTracking(HWND hWnd, HMENU hMenu, BOOL bPopup, UINT wFlags)
 
     return TRUE;
 }
+
 /***********************************************************************
  *           MENU_ExitTracking
  */
-static BOOL MENU_ExitTracking(HWND hWnd)
+static BOOL MENU_ExitTracking(HWND hWnd, BOOL bPopup)
 {
     TRACE("hwnd=%p\n", hWnd);
 
-    SendMessageW( hWnd, WM_EXITMENULOOP, 0, 0 );
+    SendMessageW( hWnd, WM_EXITMENULOOP, bPopup, 0 );
     ShowCaret(0);
     top_popup = 0;
     top_popup_hmenu = NULL;
@@ -3322,7 +3323,7 @@ void MENU_TrackMouseMenuBar( HWND hWnd, INT ht, POINT pt )
     {
 	MENU_InitTracking( hWnd, hMenu, FALSE, wFlags );
 	MENU_TrackMenu( hMenu, wFlags, pt.x, pt.y, hWnd, NULL );
-	MENU_ExitTracking(hWnd);
+	MENU_ExitTracking(hWnd, FALSE);
     }
 }
 
@@ -3384,7 +3385,7 @@ void MENU_TrackKbdMenuBar( HWND hwnd, UINT wParam, WCHAR wChar)
 
 track_menu:
     MENU_TrackMenu( hTrackMenu, wFlags, 0, 0, hwnd, NULL );
-    MENU_ExitTracking( hwnd );
+    MENU_ExitTracking( hwnd, FALSE );
 }
 
 /**********************************************************************
@@ -3424,7 +3425,7 @@ BOOL WINAPI TrackPopupMenuEx( HMENU hMenu, UINT wFlags, INT x, INT y,
     if (MENU_ShowPopup( hWnd, hMenu, 0, wFlags, x, y, 0, 0 ))
         ret = MENU_TrackMenu( hMenu, wFlags | TPM_POPUPMENU, 0, 0, hWnd,
                               lpTpm ? &lpTpm->rcExclude : NULL );
-    MENU_ExitTracking(hWnd);
+    MENU_ExitTracking(hWnd, TRUE);
 
     return ret;
 }




More information about the wine-cvs mailing list