1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:37:45 +00:00

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

View file

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