]> Dogcows Code - chaz/openbox/blobdiff - openbox/menuframe.c
ANSI function declarations, ie () -> (void)
[chaz/openbox] / openbox / menuframe.c
index d2f513c430e28c5b9f5fd4d4577bb53744ec2aec..979e834ff60d0f2c8f8edb1db3f04b255e302747 100644 (file)
@@ -637,9 +637,9 @@ void menu_frame_render(ObMenuFrame *self)
     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;
@@ -1057,7 +1057,7 @@ static void menu_frame_hide(ObMenuFrame *self)
     menu_frame_free(self);
 }
 
-void menu_frame_hide_all()
+void menu_frame_hide_all(void)
 {
     GList *it;
 
@@ -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;
 }
This page took 0.026824 seconds and 4 git commands to generate.