]> Dogcows Code - chaz/openbox/commitdiff
Fix a minor issue with lastdesktop right after startup.
authorMikael Magnusson <mikachu@comhem.se>
Sat, 9 Feb 2008 10:43:26 +0000 (11:43 +0100)
committerMikael Magnusson <mikachu@comhem.se>
Sat, 9 Feb 2008 10:43:26 +0000 (11:43 +0100)
openbox/screen.c

index fcd0de8c42ff2dccdb530db000cd40f687c623dd..9135353897bef24aac80fbdbbc4a1f1b2b7c36dd 100644 (file)
@@ -606,10 +606,15 @@ void screen_set_desktop(guint num, gboolean dofocus)
         /* If screen_desktop_timeout is true, then we've been on this desktop
            long enough and we can save it as the last desktop. */
 
-        /* save the "last desktop" as the "old desktop" */
-        screen_old_desktop = screen_last_desktop;
-        /* save the desktop we're coming from as the "last desktop" */
-        screen_last_desktop = previous;
+        if (screen_last_desktop == previous)
+            /* this is the startup state only */
+            screen_old_desktop = screen_desktop;
+        else {
+            /* save the "last desktop" as the "old desktop" */
+            screen_old_desktop = screen_last_desktop;
+            /* save the desktop we're coming from as the "last desktop" */
+            screen_last_desktop = previous;
+        }
     }
     else {
         /* If screen_desktop_timeout is false, then we just got to this desktop
This page took 0.023815 seconds and 4 git commands to generate.