]> Dogcows Code - chaz/openbox/blobdiff - openbox/event.c
fix escape's behavior in menus. make static stuff that shouldnt be used by others
[chaz/openbox] / openbox / event.c
index 8f21120248af2e5d6ee7f8eb0e5e7208990cbd2d..ace548a6498fbe3b877ed4469cf9740cb3dc9d44 100644 (file)
@@ -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 ||
This page took 0.021822 seconds and 4 git commands to generate.