summaryrefslogtreecommitdiff
path: root/openbox/screen.c
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@comhem.se>2008-02-09 11:43:26 +0100
committerDana Jansens <danakj@orodu.net>2008-02-13 21:36:16 -0500
commitd5a25283dceb4b0eb7f1dcba1ac15674f6422fbe (patch)
treee8e6725a6d3416f3950e368d15e8a58b451ea221 /openbox/screen.c
parenteddcfdfdcd8e0238f9570358cd47eca773bff8d3 (diff)
Fix a minor issue with lastdesktop right after startup.
Diffstat (limited to 'openbox/screen.c')
-rw-r--r--openbox/screen.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/openbox/screen.c b/openbox/screen.c
index da490778..5201f78a 100644
--- a/openbox/screen.c
+++ b/openbox/screen.c
@@ -620,10 +620,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