Module: wine
Branch: master
Commit: cb2b15921daeebf763e8eb34fd9fa336d3b3311a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=cb2b15921daeebf763e8eb34f…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com>
Date: Fri Jun 13 21:11:34 2014 +0900
user32: Don't close a popup menu when clicking a sub-menu parent item twice.
---
dlls/user32/menu.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c
index 0aa7744..93bee49 100644
--- a/dlls/user32/menu.c
+++ b/dlls/user32/menu.c
@@ -2617,13 +2617,14 @@ static INT MENU_ButtonUp( MTRACKER* pmt, HMENU hPtMenu, UINT wFlags)
return executedMenuId;
}
- /* If we are dealing with the top-level menu */
+ /* If we are dealing with the menu bar */
/* and this is a click on an already "popped" item: */
/* Stop the menu tracking and close the opened submenus */
if((pmt->hTopMenu == hPtMenu) && ptmenu->bTimeToHide)
return 0;
}
- ptmenu->bTimeToHide = TRUE;
+ if( GetMenu(ptmenu->hWnd) == hPtMenu )
+ ptmenu->bTimeToHide = TRUE;
}
return -1;
}