From 3ef837fd409aa1dc999c886f3618348c8bee4751 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Fri, 12 Apr 2013 22:59:39 +0200 Subject: [PATCH] If a submenu was opened, the parent menu tracking loop would continue calling _HitTestItems() even if the user didn't move the mouse. --- src/kits/interface/Menu.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/kits/interface/Menu.cpp b/src/kits/interface/Menu.cpp index 0485f9779b..7221611f5d 100644 --- a/src/kits/interface/Menu.cpp +++ b/src/kits/interface/Menu.cpp @@ -1729,7 +1729,8 @@ BMenu::_Track(int* action, long start) GetMouse(&newLocation, &newButtons, true); UnlockLooper(); } while (newLocation == location && newButtons == buttons - && !(item && item->Submenu() != NULL) + && !(item != NULL && item->Submenu() != NULL + && item->Submenu()->Window() == NULL) && fState == MENU_STATE_TRACKING); if (newLocation != location || newButtons != buttons) {