Commit cb2b1592 authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

user32: Don't close a popup menu when clicking a sub-menu parent item twice.

parent c6de8ad9
...@@ -2617,13 +2617,14 @@ static INT MENU_ButtonUp( MTRACKER* pmt, HMENU hPtMenu, UINT wFlags) ...@@ -2617,13 +2617,14 @@ static INT MENU_ButtonUp( MTRACKER* pmt, HMENU hPtMenu, UINT wFlags)
return executedMenuId; 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: */ /* and this is a click on an already "popped" item: */
/* Stop the menu tracking and close the opened submenus */ /* Stop the menu tracking and close the opened submenus */
if((pmt->hTopMenu == hPtMenu) && ptmenu->bTimeToHide) if((pmt->hTopMenu == hPtMenu) && ptmenu->bTimeToHide)
return 0; return 0;
} }
ptmenu->bTimeToHide = TRUE; if( GetMenu(ptmenu->hWnd) == hPtMenu )
ptmenu->bTimeToHide = TRUE;
} }
return -1; return -1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment