]> Dogcows Code - chaz/openbox/commitdiff
was not moving the window between desktop focus lists sometimes. bad news. now i...
authorDana Jansens <danakj@orodu.net>
Fri, 28 Mar 2003 08:23:18 +0000 (08:23 +0000)
committerDana Jansens <danakj@orodu.net>
Fri, 28 Mar 2003 08:23:18 +0000 (08:23 +0000)
openbox/client.c

index 278ee38edf35491efa119aaed4844731eab298fa..209f5f9657e2b826fa0f4679047b0066e6e6093a 100644 (file)
@@ -1730,19 +1730,20 @@ void client_set_desktop(Client *self, guint target, gboolean donthide)
     if (old == DESKTOP_ALL) {
         for (i = 0; i < screen_num_desktops; ++i)
             focus_order[i] = g_list_remove(focus_order[i], self);
+    } else
+        focus_order[old] = g_list_remove(focus_order[old], self);
+    if (target == DESKTOP_ALL) {
+        for (i = 0; i < screen_num_desktops; ++i) {
+            if (focus_new.bool)
+                focus_order[i] = g_list_prepend(focus_order[i], self);
+            else
+                focus_order[i] = g_list_append(focus_order[i], self);
+        }
+    } else {
         if (focus_new.bool)
             focus_order[target] = g_list_prepend(focus_order[target], self);
         else
             focus_order[target] = g_list_append(focus_order[target], self);
-    } else {
-        focus_order[old] = g_list_remove(focus_order[old], self);
-        if (target == DESKTOP_ALL)
-            for (i = 0; i < screen_num_desktops; ++i) {
-                if (focus_new.bool)
-                    focus_order[i] = g_list_prepend(focus_order[i], self);
-                else
-                    focus_order[i] = g_list_append(focus_order[i], self);
-            }
     }
 
     dispatch_client(Event_Client_Desktop, self, target, old);
This page took 0.025033 seconds and 4 git commands to generate.