From 83da4ec9398d197f39461cd7305163b2676840c8 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 19 May 2007 20:58:10 +0000 Subject: fix escape's behavior in menus. make static stuff that shouldnt be used by others --- openbox/event.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'openbox/event.c') diff --git a/openbox/event.c b/openbox/event.c index 8f211202..ace548a6 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -1482,8 +1482,11 @@ static gboolean event_handle_menu_keyboard(XEvent *ev) 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 || -- cgit v1.2.3