small change
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13178 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -411,8 +411,9 @@ BMenuBar::Track(int32 *action, int32 startIndex, bool showMenu)
|
|||||||
if (menuItem != NULL && menuItem != fSelected) {
|
if (menuItem != NULL && menuItem != fSelected) {
|
||||||
// only select the item
|
// only select the item
|
||||||
SelectItem(menuItem, -1);
|
SelectItem(menuItem, -1);
|
||||||
if (menuItem->Submenu() != NULL) {
|
if (menuItem->Submenu() != NULL
|
||||||
// open the menu
|
&& menuItem->Submenu()->Window() == NULL) {
|
||||||
|
// open the menu if it's not opened yet
|
||||||
SelectItem(menuItem);
|
SelectItem(menuItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -421,6 +422,8 @@ BMenuBar::Track(int32 *action, int32 startIndex, bool showMenu)
|
|||||||
BMenu *menu = fSelected->Submenu();
|
BMenu *menu = fSelected->Submenu();
|
||||||
if (menu != NULL) {
|
if (menu != NULL) {
|
||||||
window->Unlock();
|
window->Unlock();
|
||||||
|
if (IsStickyPrefOn())
|
||||||
|
menu->SetStickyMode(true);
|
||||||
snoozeAmount = 0;
|
snoozeAmount = 0;
|
||||||
resultItem = menu->_track(&localAction);
|
resultItem = menu->_track(&localAction);
|
||||||
if (window->LockWithTimeout(200000) < B_OK)
|
if (window->LockWithTimeout(200000) < B_OK)
|
||||||
@@ -429,7 +432,8 @@ BMenuBar::Track(int32 *action, int32 startIndex, bool showMenu)
|
|||||||
}
|
}
|
||||||
|
|
||||||
window->Unlock();
|
window->Unlock();
|
||||||
if (buttons == 0 || localAction == MENU_ACT_CLOSE)
|
|
||||||
|
if (localAction == MENU_ACT_CLOSE)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (snoozeAmount > 0)
|
if (snoozeAmount > 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user