summaryrefslogtreecommitdiff
path: root/openbox/screen.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-05-06 05:19:19 +0000
committerDana Jansens <danakj@orodu.net>2007-05-06 05:19:19 +0000
commit1bf9de380991206d4afa104cd31c567583f288c2 (patch)
tree4324eaf88c9e11e276557dd72e4c570c29860c99 /openbox/screen.c
parenta6aaabe62c3651169dda9a1a34bcec64dad4ee92 (diff)
refactor all the session stuff. yay, it works properly now.
make sessions save the desktop being displayed. can we get rid of config_firstdesk now? refactor startup a bit. focus the window that was focused when we were restarted. have clients properly restore their session state. add undecorated to the saved session state for clients.
Diffstat (limited to 'openbox/screen.c')
-rw-r--r--openbox/screen.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/openbox/screen.c b/openbox/screen.c
index a413411a..a32f649f 100644
--- a/openbox/screen.c
+++ b/openbox/screen.c
@@ -28,6 +28,7 @@
#include "config.h"
#include "screen.h"
#include "client.h"
+#include "session.h"
#include "frame.h"
#include "event.h"
#include "focus.h"
@@ -328,7 +329,10 @@ void screen_startup(gboolean reconfig)
d < screen_num_desktops)
{
screen_set_desktop(d);
- } else
+ } else if (session_desktop >= 0)
+ screen_set_desktop(MIN((guint)session_desktop,
+ screen_num_desktops));
+ else
screen_set_desktop(MIN(config_screen_firstdesk,
screen_num_desktops) - 1);