menu: run actions on button release

...and call actions after closing menus so that virtual keyboard input
caused by actions are sent to the surface with keyboard-focus rather
than being consumed by the open menu.

Fixes: #1366
This commit is contained in:
Johan Malm 2023-12-28 22:44:59 +00:00 committed by Johan Malm
parent cc8f4f943a
commit e9023f51c6
3 changed files with 24 additions and 17 deletions

View file

@ -331,10 +331,7 @@ handle_menu_keys(struct server *server, struct keysyms *syms)
menu_submenu_leave(server);
break;
case XKB_KEY_Return:
if (menu_call_selected_actions(server)) {
menu_close_root(server);
cursor_update_focus(server);
}
menu_call_selected_actions(server);
break;
case XKB_KEY_Escape:
menu_close_root(server);