More hacks to BWindow's mousedown handler, to fix some problems with menus. Fixes bug 610 among other things. Note: I don't like this code so much, but apparently BeOS handles it in a similar way. I accept suggestions on how to improve this.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17606 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2006-05-27 13:00:35 +00:00
parent e061d1bae5
commit 848b89034e
2 changed files with 14 additions and 6 deletions
+7 -1
View File
@@ -2064,8 +2064,14 @@ BMenu::OkToProceed(BMenuItem* item)
void
BMenu::QuitTracking()
{
fState = MENU_STATE_CLOSED;
if (IsStickyMode())
SetStickyMode(false);
if (fSelected != NULL)
SelectItem(NULL);
if (BMenuBar *menuBar = dynamic_cast<BMenuBar *>(this))
menuBar->RestoreFocus();
fState = MENU_STATE_CLOSED;
}