summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);