X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fmenuframe.c;h=2c666e3f3eceb0386e05f2252d4e8d9d58823104;hb=bfb0c916718cd6f68ef100841a625b06602f616b;hp=7fff8b691263d16c8adb9ad7822c2be9aefae372;hpb=e2da61b2e7cbaace1f8799ec1fcd506c281892bf;p=chaz%2Fopenbox diff --git a/openbox/menuframe.c b/openbox/menuframe.c index 7fff8b69..2c666e3f 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -605,7 +605,7 @@ static gint menu_entry_frame_get_height(ObMenuEntryFrame *self, if (self->entry->data.separator.label != NULL) { h += ob_rr_theme->menu_title_height + (ob_rr_theme->mbwidth - PADDING) * 2; - + /* if the first entry is a labeled separator, then make its border overlap with the menu's outside border */ if (first_entry) @@ -888,7 +888,7 @@ static void menu_frame_update(ObMenuFrame *self) more_frame = menu_entry_frame_new(more_entry, self); /* make it get deleted when the menu frame goes away */ menu_entry_unref(more_entry); - + /* add our More... entry to the frame */ self->entries = g_list_append(self->entries, more_frame); } @@ -1075,8 +1075,14 @@ void menu_frame_hide_all_client(ObClient *client) GList *it = g_list_last(menu_frame_visible); if (it) { ObMenuFrame *f = it->data; - if (f->client == client) + if (f->client == client) { + if (config_submenu_show_delay) { + /* remove any submenu open requests */ + ob_main_loop_timeout_remove(ob_main_loop, + menu_entry_frame_submenu_timeout); + } menu_frame_hide(f); + } } } @@ -1121,6 +1127,7 @@ ObMenuEntryFrame* menu_entry_frame_under(gint x, gint y) static gboolean menu_entry_frame_submenu_timeout(gpointer data) { + g_assert(menu_frame_visible); menu_entry_frame_show_submenu((ObMenuEntryFrame*)data); return FALSE; } @@ -1135,8 +1142,8 @@ void menu_frame_select(ObMenuFrame *self, ObMenuEntryFrame *entry, entry = old; if (old == entry) return; - - if (config_submenu_show_delay) { + + if (config_submenu_show_delay) { /* remove any submenu open requests */ ob_main_loop_timeout_remove(ob_main_loop, menu_entry_frame_submenu_timeout);