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)
STRUT_SET(self->item_margin, 0, 0, 0, 0);
if (self->entries) {
- ObMenuEntryFrame *e = self->entries->data;
gint l, t, r, b;
+ e = self->entries->data;
e->a_text_normal->texture[0].data.text.string = "";
tw = RrMinWidth(e->a_text_normal);
tw += 2*PADDING;
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);
}
menu_frame_free(self);
}
-void menu_frame_hide_all()
+void menu_frame_hide_all(void)
{
GList *it;
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);
+ }
}
}
static gboolean menu_entry_frame_submenu_timeout(gpointer data)
{
+ g_assert(menu_frame_visible);
menu_entry_frame_show_submenu((ObMenuEntryFrame*)data);
return FALSE;
}
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);