]> Dogcows Code - chaz/openbox/blobdiff - openbox/screen.c
watch for windows without frames, they can be in the transient order before they...
[chaz/openbox] / openbox / screen.c
index 72363cdc74ee61f0bc9e41aebc51e80b005c0f36..03cee447e7456c40093da8f37ac4faf6fe6ebe5d 100644 (file)
@@ -1,5 +1,6 @@
 #include "openbox.h"
 #include "prop.h"
+#include "startup.h"
 #include "config.h"
 #include "screen.h"
 #include "client.h"
@@ -173,8 +174,10 @@ void screen_startup()
 
     screen_num_desktops = 0;
     screen_set_num_desktops(config_desktops_num);
-    screen_desktop = 0;
-    screen_set_desktop(0);
+    if (startup_desktop >= screen_num_desktops)
+        startup_desktop = 0;
+    screen_desktop = startup_desktop;
+    screen_set_desktop(startup_desktop);
 
     /* don't start in showing-desktop mode */
     screen_showing_desktop = FALSE;
@@ -302,7 +305,6 @@ void screen_set_desktop(guint num)
 
     /* focus the last focused window on the desktop, and ignore enter events
        from the switch so it doesnt mess with the focus */
-    XSync(ob_display, FALSE);
     while (XCheckTypedEvent(ob_display, EnterNotify, &e));
     focus_fallback(Fallback_Desktop);
 
This page took 0.023008 seconds and 4 git commands to generate.