all repos — openbox @ 83da4ec9398d197f39461cd7305163b2676840c8

openbox fork - make it a bit more like ryudo

fix escape's behavior in menus. make static stuff that shouldnt be used by others
Dana Jansens danakj@orodu.net
commit

83da4ec9398d197f39461cd7305163b2676840c8

parent

ea272a93efe26bb6c0b0d9278cee4a67cc9c872e

3 files changed, 7 insertions(+), 4 deletions(-)

jump to
M openbox/event.copenbox/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 ||
M openbox/menuframe.copenbox/menuframe.c

@@ -45,6 +45,7 @@ ObMenuFrame *frame);

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)

@@ -1013,7 +1014,7 @@

return TRUE; } -void menu_frame_hide(ObMenuFrame *self) +static void menu_frame_hide(ObMenuFrame *self) { GList *it = g_list_find(menu_frame_visible, self);
M openbox/menuframe.hopenbox/menuframe.h

@@ -128,7 +128,6 @@ gboolean menu_frame_show_topmenu(ObMenuFrame *self, gint x, gint y,

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);