WindowServer: Select first item when opening a menu via Alt shortcut

To make keyboard navigation a little nicer, select the first/top menu
item right away.
This commit is contained in:
Andreas Kling 2021-04-05 23:09:55 +02:00
parent 357f288fef
commit 1f4dc670d4
Notes: sideshowbarker 2024-07-18 20:44:38 +09:00

View file

@ -492,6 +492,8 @@ void Window::handle_keydown_event(const KeyEvent& event)
});
if (menu_to_open) {
frame().open_menubar_menu(*menu_to_open);
if (!menu_to_open->is_empty())
menu_to_open->set_hovered_item(0);
return;
}
}