fix escape's behavior in menus. make static stuff that shouldnt be used by others
This commit is contained in:
parent
ea272a93ef
commit
83da4ec939
3 changed files with 7 additions and 4 deletions
|
@ -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 ||
|
||||
|
|
|
@ -45,6 +45,7 @@ static ObMenuEntryFrame* menu_entry_frame_new(ObMenuEntry *entry,
|
|||
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 @@ gboolean menu_frame_show_submenu(ObMenuFrame *self, ObMenuFrame *parent,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void menu_frame_hide(ObMenuFrame *self)
|
||||
static void menu_frame_hide(ObMenuFrame *self)
|
||||
{
|
||||
GList *it = g_list_find(menu_frame_visible, self);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue