]> Dogcows Code - chaz/openbox/commitdiff
um... hide the client menu when the window changes desktops. its not visible anymore...
authorDana Jansens <danakj@orodu.net>
Mon, 7 May 2007 23:48:05 +0000 (23:48 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 7 May 2007 23:48:05 +0000 (23:48 +0000)
openbox/client.c
openbox/client_list_menu.c
openbox/client_menu.c
openbox/menu.c

index 0d74882ce87abf53cee7df2157d4f455d21665df..54ae99fcceb074949c4a97850ae57fdfa7fff4fa 100644 (file)
@@ -3027,6 +3027,7 @@ void client_set_desktop_recursive(ObClient *self,
             focus_order_to_bottom(self);
 
         /* call the notifies */
+        GSList *it;
         for (it = client_desktop_notifies; it; it = g_slist_next(it)) {
             ClientCallback *d = it->data;
             d->func(self, d->data);
index 036c2408bf764fc9106aae6cf4885a426035fdc9..12c16815a432fd8899a6139d8a8ab54072dfa371 100644 (file)
@@ -159,7 +159,7 @@ static gboolean self_update(ObMenuFrame *frame, gpointer data)
     }
     for (; it; it = next, ++i) {
         next = g_slist_next(it);
-        menu_unref(it->data);
+        menu_free(it->data);
         desktop_menus = g_slist_delete_link(desktop_menus, it);
         menu_entry_remove(menu_find_entry_id(menu, i));
     }
index 8375d396819bd189937fd00d884786149ad270a9..11e31965d68f5ce5a7e792af193c5eb71b86e029 100644 (file)
@@ -173,26 +173,8 @@ static void desktop_change_callback(ObClient *c, gpointer data)
 {
     ObMenuFrame *frame = data;
     if (c == frame->client) {
-        /* adding/removing entries while it's shown is not fun, so just hide
-         the menu and reshow it */
-        if (frame->parent) {
-            ObMenuEntryFrame *me = frame->parent_entry;
-            ObMenuFrame *parent = frame->parent;
-            gint sel =
-                g_list_position(frame->entries,
-                                g_list_find(frame->entries, frame->selected));
-            menu_frame_select(parent, NULL, TRUE);
-            menu_frame_select(parent, me, TRUE);
-
-            frame = parent->child;
-            /* reselect the same spot or the last one if it got shorter */
-            sel = MIN(sel, (gint)g_list_length(frame->entries));
-            if (sel >= 0)
-                menu_frame_select(frame,
-                                  g_list_nth(frame->entries, sel)->data,
-                                  TRUE);
-        } else
-            menu_frame_hide(frame);
+        /* the client won't even be on the screen anymore, so hide the menu */
+        menu_frame_hide_all();
     }
 }
 
index da9ba6b851aa2889eaf0b9b92308811b123284bd..0e203739bda36ca15c2e9c0eae7c9075ad67f6b4 100644 (file)
@@ -361,7 +361,7 @@ static void menu_destroy_hash_value(ObMenu *self)
     g_free(self);
 }
 
-void menu_unref(ObMenu *menu)
+void menu_free(ObMenu *menu)
 {
     if (menu)
         g_hash_table_remove(menu_hash, menu->name);
This page took 0.029754 seconds and 4 git commands to generate.