]> Dogcows Code - chaz/openbox/blobdiff - openbox/screen.c
revert r6802.
[chaz/openbox] / openbox / screen.c
index 6a64c025e09941542dbf4ecdef27e5ecd937fb79..f424ca041c13480c076eea71840da70878bb3649 100644 (file)
@@ -508,10 +508,11 @@ void screen_set_desktop(guint num, gboolean dofocus)
      
     g_assert(num < screen_num_desktops);
 
-    if (old == num) return;
-
     old = screen_desktop;
     screen_desktop = num;
+
+    if (old == num) return;
+
     PROP_SET32(RootWindow(ob_display, ob_screen),
                net_current_desktop, cardinal, num);
 
@@ -532,7 +533,8 @@ void screen_set_desktop(guint num, gboolean dofocus)
         }
     }
 
-    if (focus_client && (focus_client->desktop == DESKTOP_ALL ||
+    if (focus_client && ((client_normal(focus_client) &&
+                          focus_client->desktop == DESKTOP_ALL) ||
                          focus_client->desktop == screen_desktop))
         dofocus = FALSE;
 
@@ -938,7 +940,7 @@ void screen_update_desktop_names()
         it = g_slist_nth(config_desktops_names, i);
 
         for (; i < screen_num_desktops; ++i) {
-            if (it)
+            if (it && ((char*)it->data)[0]) /* not empty */
                 /* use the names from the config file when possible */
                 screen_desktop_names[i] = g_strdup(it->data);
             else
This page took 0.021931 seconds and 4 git commands to generate.