]> Dogcows Code - chaz/openbox/blobdiff - openbox/focus.c
Redraw the focus cycle popup when the list of focusable windows changes, rather than...
[chaz/openbox] / openbox / focus.c
index 7eea6c39c73e79fcde234203f0ea2c72405b0cc5..c82c4f62f8bea69a575c5d483343e0a169a8fb71 100644 (file)
@@ -98,6 +98,9 @@ void focus_set_client(ObClient *client)
         PROP_SET32(RootWindow(ob_display, ob_screen),
                    net_active_window, window, active);
     }
+
+    /* make sure the focus cycle popup shows things in the right order */
+    focus_cycle_reorder();
 }
 
 static ObClient* focus_fallback_target(gboolean allow_refocus,
@@ -184,12 +187,6 @@ ObClient* focus_fallback(gboolean allow_refocus, gboolean allow_pointer,
 
 void focus_nothing(void)
 {
-    /* Install our own colormap */
-    if (focus_client != NULL) {
-        screen_install_colormap(focus_client, FALSE);
-        screen_install_colormap(NULL, TRUE);
-    }
-
     /* nothing is focused, update the colormap and _the root property_ */
     focus_set_client(NULL);
 
@@ -212,16 +209,14 @@ void focus_order_add_new(ObClient *c)
             focus_order = g_list_insert(focus_order, c, 1);
     }
 
-    /* in the middle of cycling..? kill it. */
-    focus_cycle_stop(c);
+    focus_cycle_add(c);
 }
 
 void focus_order_remove(ObClient *c)
 {
     focus_order = g_list_remove(focus_order, c);
 
-    /* in the middle of cycling..? kill it. */
-    focus_cycle_stop(c);
+    focus_cycle_remove(c);
 }
 
 void focus_order_to_top(ObClient *c)
@@ -299,6 +294,9 @@ gboolean focus_valid_target(ObClient *ft,
 {
     gboolean ok = FALSE;
 
+    /* see if the window is still managed or is going away */
+    if (!ft->managed) return FALSE;
+
     /* it's on this desktop unless you want all desktops.
 
        do this check first because it will usually filter out the most
This page took 0.022535 seconds and 4 git commands to generate.