summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'session.c')
-rw-r--r--session.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/session.c b/session.c
index 8408992..df66071 100644
--- a/session.c
+++ b/session.c
@@ -335,6 +335,21 @@ sessionGetStringForProp (xmlNodePtr node,
}
static Bool
+sessionWindowIsOnAllViewports (CompWindow *w)
+{
+ /* core's windowOnAllViewports function also returns TRUE for
+ non-viewable windows, which is why we have to duplicate the
+ window type/state check here */
+ if (w->type & (CompWindowTypeDockMask | CompWindowTypeDesktopMask))
+ return TRUE;
+
+ if (w->state & CompWindowStateStickyMask)
+ return TRUE;
+
+ return FALSE;
+}
+
+static Bool
isSessionWindow (CompWindow *w)
{
if (w->attrib.override_redirect)
@@ -427,7 +442,7 @@ sessionAddWindowNode (CompWindow *w,
x = (w->saveMask & CWX) ? w->saveWc.x : w->serverX;
y = (w->saveMask & CWY) ? w->saveWc.y : w->serverY;
- if (!windowOnAllViewports (w))
+ if (!sessionWindowIsOnAllViewports (w))
{
x += w->screen->x * w->screen->width;
y += w->screen->y * w->screen->height;
@@ -643,7 +658,7 @@ sessionReadWindow (CompWindow *w)
xwc.x = cur->geometry.x + w->input.left;
xwc.y = cur->geometry.y + w->input.top;
- if (!windowOnAllViewports (w))
+ if (!sessionWindowIsOnAllViewports (w))
{
xwc.x -= (w->screen->x * w->screen->width);
xwc.y -= (w->screen->y * w->screen->height);