fix escape's behavior in menus. make static stuff that shouldnt be used by others
Dana Jansens danakj@orodu.net
3 files changed,
7 insertions(+),
4 deletions(-)
M
openbox/event.c
→
openbox/event.c
@@ -1482,8 +1482,11 @@ if (frame == NULL)
ret = FALSE; else if (keycode == ob_keycode(OB_KEY_ESCAPE) && state == 0) { - /* Escape closes the active menu */ - menu_frame_hide(frame); + /* Escape goes to the parent menu or closes the last one */ + if (frame->parent) + menu_frame_select(frame, NULL, TRUE); + else + menu_frame_hide_all(); } else if (keycode == ob_keycode(OB_KEY_RETURN) && (state == 0 ||