close the menu immediately when user clicks outside the menu
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19366 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1348,11 +1348,15 @@ BMenu::_track(int *action, bigtime_t trackTime, long start)
|
|||||||
UnlockLooper();
|
UnlockLooper();
|
||||||
|
|
||||||
if (buttons != 0 && IsStickyMode()) {
|
if (buttons != 0 && IsStickyMode()) {
|
||||||
BMenu *supermenu = Supermenu();
|
if (item == NULL)
|
||||||
for(; supermenu; supermenu = supermenu->Supermenu())
|
fState = MENU_STATE_CLOSED;
|
||||||
supermenu->SetStickyMode(false);
|
else {
|
||||||
SetStickyMode(false);
|
BMenu *supermenu = Supermenu();
|
||||||
trackTime = 0;
|
for(; supermenu; supermenu = supermenu->Supermenu())
|
||||||
|
supermenu->SetStickyMode(false);
|
||||||
|
SetStickyMode(false);
|
||||||
|
trackTime = 0;
|
||||||
|
}
|
||||||
} else if (buttons == 0 && !IsStickyMode()) {
|
} else if (buttons == 0 && !IsStickyMode()) {
|
||||||
/* TODO: FIXME! trackTime is a hacky workaround for BMenuField. It
|
/* TODO: FIXME! trackTime is a hacky workaround for BMenuField. It
|
||||||
opens directly under your mouse pointer, so when you release the mouse
|
opens directly under your mouse pointer, so when you release the mouse
|
||||||
|
|||||||
Reference in New Issue
Block a user