From 357433e049cc9a38010d874bb9a1175f76e11e54 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Mon, 10 Apr 2006 19:52:47 +0000 Subject: [PATCH] more subtle fixes for menubar git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17056 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/MenuBar.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/kits/interface/MenuBar.cpp b/src/kits/interface/MenuBar.cpp index af193bc49b..313be53b15 100644 --- a/src/kits/interface/MenuBar.cpp +++ b/src/kits/interface/MenuBar.cpp @@ -212,6 +212,7 @@ void BMenuBar::FrameResized(float newWidth, float newHeight) { BMenu::FrameResized(newWidth, newHeight); + fLastBounds->Set(0, 0, newWidth, newHeight); } @@ -407,14 +408,12 @@ BMenuBar::Track(int32 *action, int32 startIndex, bool showMenu) BMenu *menu = fSelected->Submenu(); if (menu != NULL) { window->Unlock(); - if (IsStickyMode()) - menu->SetStickyMode(true); snoozeAmount = 0; resultItem = menu->_track(&localAction); if (!window->Lock())//WithTimeout(200000) < B_OK) break; } - } else if (menuItem == NULL) + } else if (menuItem == NULL && !fLastBounds->Contains(where)) SelectItem(NULL); window->Unlock(); @@ -443,6 +442,8 @@ BMenuBar::Track(int32 *action, int32 startIndex, bool showMenu) window->Unlock(); } + if (IsStickyMode()) + SetStickyMode(false); DeleteMenuWindow(); if (action != NULL)