]> Dogcows Code - chaz/openbox/blobdiff - openbox/client_menu.c
um... hide the client menu when the window changes desktops. its not visible anymore...
[chaz/openbox] / openbox / client_menu.c
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();
     }
 }
 
This page took 0.020177 seconds and 4 git commands to generate.