summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2011-04-21 09:09:08 +0200
committerDanny Baumann <dannybaumann@web.de>2011-04-21 09:09:08 +0200
commitcd5c0faa0e7f180bb73e05cb41bd1a7a27e8e0a8 (patch)
tree6749fb232389714d8d6c4c02efb5610f4e8d0017 /session.c
parentb030977e788b5c6e57a7dfe4d179e0bfd33bf2d4 (diff)
downloadsession-cd5c0faa0e7f180bb73e05cb41bd1a7a27e8e0a8.tar.gz
session-cd5c0faa0e7f180bb73e05cb41bd1a7a27e8e0a8.tar.bz2
Also explicitly restore 'unmaximized', 'unshaded' etc. state.
Diffstat (limited to 'session.c')
-rw-r--r--session.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/session.c b/session.c
index df66071..ef93b05 100644
--- a/session.c
+++ b/session.c
@@ -98,6 +98,14 @@ typedef struct _SessionDisplay
#define NUM_OPTIONS(x) (sizeof ((x)->opt) / sizeof (CompOption))
+/* window state flags we're actively trying to save and restore */
+#define SAVED_WINDOW_STATE \
+ (CompWindowStateShadedMask | \
+ CompWindowStateStickyMask | \
+ CompWindowStateFullscreenMask | \
+ CompWindowStateMaximizedHorzMask | \
+ CompWindowStateMaximizedVertMask)
+
static int corePrivateIndex;
static int displayPrivateIndex;
@@ -688,11 +696,8 @@ sessionReadWindow (CompWindow *w)
if (cur->workspace != -1)
setDesktopForWindow (w, cur->workspace);
- if (cur->state)
- {
- changeWindowState (w, w->state | cur->state);
- updateWindowAttributes (w, CompStackingUpdateModeNone);
- }
+ changeWindowState (w, (w->state & ~SAVED_WINDOW_STATE) | cur->state);
+ updateWindowAttributes (w, CompStackingUpdateModeNone);
/* remove item from list */
sessionRemoveWindowListItem (cur);