In the menubar tracking function, loop indefinitely if mouse stands
still. This way keyboard menu navigation works much better. Unfortunately I can't apply the same trick for BMenu since it opens the submenu with a delay, and that won't work anymore. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24296 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -531,14 +531,22 @@ BMenuBar::_Track(int32 *action, int32 startIndex, bool showMenu)
|
||||
|
||||
window->Unlock();
|
||||
|
||||
if (fState != MENU_STATE_CLOSED) {
|
||||
if (snoozeAmount > 0)
|
||||
snooze(snoozeAmount);
|
||||
if (fState != MENU_STATE_CLOSED) {
|
||||
// if user doesn't move the mouse, loop here,
|
||||
// so we don't interfer with keyboard menu navigation
|
||||
BPoint newLocation;
|
||||
uint32 newButtons;
|
||||
do {
|
||||
snooze(snoozeAmount);
|
||||
if (!LockLooper())
|
||||
break;
|
||||
GetMouse(&newLocation, &newButtons, true);
|
||||
UnlockLooper();
|
||||
} while (newLocation == where
|
||||
&& newButtons == buttons);
|
||||
|
||||
if (window->Lock()) {
|
||||
GetMouse(&where, &buttons, true);
|
||||
window->Unlock();
|
||||
}
|
||||
where = newLocation;
|
||||
buttons = newButtons;
|
||||
|
||||
if (buttons != 0 && _IsStickyMode()) {
|
||||
if (menuItem == NULL)
|
||||
|
||||
Reference in New Issue
Block a user