changeset 3198:8571a68d0fa8

Fixed #286: Updated screen configure to ensure that a sticky client also keeps the gravity
author unexist
date Sun, 25 Mar 2012 18:49:56 +0200
parents 0fd82ca59a03
children f5d825c4519e
files src/subtle/screen.c
diffstat 1 files changed, 12 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/subtle/screen.c	Sun Mar 25 18:43:41 2012 +0200
+++ b/src/subtle/screen.c	Sun Mar 25 18:49:56 2012 +0200
@@ -336,14 +336,20 @@
               /* Find visible clients */
               if(VISIBLETAGS(c, v->tags))
                 {
+                  /* Keep screen when sticky */
+                  if(c->flags & SUB_CLIENT_MODE_STICK)
+                    {
+                      /* Keep gravity from sticky screen/view and not the one
+                       * of the current screen/view in loop */
+                      s = SCREEN(subtle->screens->data[c->screenid]);
+
+                      screenid = c->screenid;
+                    }
+                  else screenid = j;
+
+                  viewid    = s->viewid;
                   gravityid = c->gravities[s->viewid];
-                  viewid    = s->viewid;
-                  screenid  = j;
                   visible++;
-
-                  /* Keep screen on sticky mode */
-                  if(c->flags & SUB_CLIENT_MODE_STICK)
-                    screenid = c->screenid;
                 }
             }