Huw Davies : user32: End the tracking on a system menu double-click.
Alexandre Julliard
julliard at winehq.org
Mon Jun 5 16:56:32 CDT 2017
Module: wine
Branch: master
Commit: 022e4b824396a869512df39e93247b8a8847e512
URL: http://source.winehq.org/git/wine.git/?a=commit;h=022e4b824396a869512df39e93247b8a8847e512
Author: Huw Davies <huw at codeweavers.com>
Date: Mon Jun 5 13:05:15 2017 +0100
user32: End the tracking on a system menu double-click.
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user32/menu.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c
index 00abcc9..5866383 100644
--- a/dlls/user32/menu.c
+++ b/dlls/user32/menu.c
@@ -2575,7 +2575,7 @@ static void MENU_SwitchTracking( MTRACKER* pmt, HMENU hPtMenu, UINT id, UINT wFl
*
* Return TRUE if we can go on with menu tracking.
*/
-static BOOL MENU_ButtonDown( MTRACKER* pmt, HMENU hPtMenu, UINT wFlags )
+static BOOL MENU_ButtonDown( MTRACKER* pmt, UINT message, HMENU hPtMenu, UINT wFlags )
{
TRACE("%p hPtMenu=%p\n", pmt, hPtMenu);
@@ -2586,7 +2586,10 @@ static BOOL MENU_ButtonDown( MTRACKER* pmt, HMENU hPtMenu, UINT wFlags )
enum hittest ht = ht_item;
if( IS_SYSTEM_MENU(ptmenu) )
+ {
+ if (message == WM_LBUTTONDBLCLK) return FALSE;
pos = 0;
+ }
else
ht = MENU_FindItemByCoords( ptmenu, pmt->pt, &pos );
@@ -3045,7 +3048,7 @@ static BOOL MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y,
if (wFlags & TPM_BUTTONDOWN)
{
/* Get the result in order to start the tracking or not */
- fRemove = MENU_ButtonDown( &mt, hmenu, wFlags );
+ fRemove = MENU_ButtonDown( &mt, WM_LBUTTONDOWN, hmenu, wFlags );
fEndMenu = !fRemove;
}
@@ -3131,7 +3134,7 @@ static BOOL MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y,
case WM_LBUTTONDOWN:
/* If the message belongs to the menu, removes it from the queue */
/* Else, end menu tracking */
- fRemove = MENU_ButtonDown( &mt, hmenu, wFlags );
+ fRemove = MENU_ButtonDown( &mt, msg.message, hmenu, wFlags );
fEndMenu = !fRemove;
break;
More information about the wine-cvs
mailing list