escape should close all menus

This commit is contained in:
K. Lange 2018-07-20 22:37:31 +09:00
parent 9efc3c1bf3
commit 1830bd63ac
1 changed files with 3 additions and 0 deletions

View File

@ -627,6 +627,9 @@ void menu_key_action(struct MenuList * menu, struct yutani_msg_key_event * me) {
if (menu->parent && menu->parent->window) {
yutani_focus_window(yctx, menu->parent->window->wid);
}
} else if (me->event.keycode == KEY_ESCAPE) {
hovered_menu = NULL;
menu_leave(menu);
}
}