more subtle fixes for menubar

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17056 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2006-04-10 19:52:47 +00:00
parent 337ab7d069
commit 357433e049

View File

@ -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)