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 ||
static void menu_entry_frame_free(ObMenuEntryFrame *self);
static void menu_frame_update(ObMenuFrame *self);
static gboolean menu_entry_frame_submenu_timeout(gpointer data);
+static void menu_frame_hide(ObMenuFrame *self);
static Window createWindow(Window parent, gulong mask,
XSetWindowAttributes *attrib)
return TRUE;
}
-void menu_frame_hide(ObMenuFrame *self)
+static void menu_frame_hide(ObMenuFrame *self)
{
GList *it = g_list_find(menu_frame_visible, self);
gint button);
gboolean menu_frame_show_submenu(ObMenuFrame *self, ObMenuFrame *parent,
ObMenuEntryFrame *parent_entry);
-void menu_frame_hide(ObMenuFrame *self);
void menu_frame_hide_all();
void menu_frame_hide_all_client(struct _ObClient *client);