changeset 3157:07d9e41d7b85

Updated arguments of subClientArrange
author unexist
date Wed, 14 Dec 2011 22:40:56 +0100
parents 44a484b6353b
children 3e17c26bfab3
files src/subtle/client.c src/subtle/subtle.h
diffstat 2 files changed, 13 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/subtle/client.c	Wed Dec 14 22:35:03 2011 +0100
+++ b/src/subtle/client.c	Wed Dec 14 22:40:56 2011 +0100
@@ -1027,10 +1027,10 @@
 
 void
 subClientArrange(SubClient *c,
-  int gravity,
-  int screen)
+  int gravityid,
+  int screenid)
 {
-  SubScreen *s = SCREEN(subArrayGet(subtle->screens, screen));
+  SubScreen *s = SCREEN(subArrayGet(subtle->screens, screenid));
 
   DEAD(c);
   assert(c && s);
@@ -1051,7 +1051,7 @@
     }
   else if(c->flags & SUB_CLIENT_MODE_FLOAT)
     {
-      if(c->flags & SUB_CLIENT_ARRANGE || (-1 != screen && c->screenid != screen))
+      if(c->flags & SUB_CLIENT_ARRANGE || (-1 != screenid && c->screenid != screenid))
         {
           SubScreen *s2 = SCREEN(subArrayGet(subtle->screens,
             -1 != c->screenid ? c->screenid : 0));
@@ -1063,7 +1063,7 @@
               c->geom.y      = c->geom.y - s2->geom.y + s->geom.y;
               c->geom.width  = c->geom.width;
               c->geom.height = c->geom.height;
-              c->screenid      = screen;
+              c->screenid    = screenid;
             }
 
           /* Finally resize window */
@@ -1085,17 +1085,18 @@
   else
     {
       if(c->flags & SUB_CLIENT_ARRANGE ||
-          c->gravityid != gravity || c->screenid != screen)
+          c->gravityid != gravityid || c->screenid != screenid)
         {
           XRectangle bounds = s->geom;
           int old_gravity = c->gravityid, old_screen = c->screenid;
           SubGravity *g = NULL, *old_g = NULL;
 
           /* Set values */
-          if(-1 != screen)  c->screenid = screen;
-          if(-1 != gravity) c->gravityid = c->gravities[s->viewid] = gravity;
+          if(-1 != screenid)  c->screenid  = screenid;
+          if(-1 != gravityid)
+            c->gravityid = c->gravities[s->viewid] = gravityid;
 
-          g     = GRAVITY(subArrayGet(subtle->gravities, gravity));
+          g     = GRAVITY(subArrayGet(subtle->gravities, gravityid));
           old_g = GRAVITY(subArrayGet(subtle->gravities, old_gravity));
 
           /* Gravity tiling */
@@ -1106,7 +1107,7 @@
           if(subtle->flags & SUB_SUBTLE_TILING ||
               (g && g->flags & (SUB_GRAVITY_HORZ|SUB_GRAVITY_VERT)))
             {
-              ClientTile(gravity, -1 == screen ? 0 : screen);
+              ClientTile(gravityid, -1 == screenid ? 0 : screenid);
             }
           else
             {
--- a/src/subtle/subtle.h	Wed Dec 14 22:35:03 2011 +0100
+++ b/src/subtle/subtle.h	Wed Dec 14 22:40:56 2011 +0100
@@ -774,8 +774,8 @@
 void subClientResize(SubClient *c, XRectangle *bounds,
   int size_hints);                                                ///< Resize client for screen
 void subClientRestack(SubClient *c, int dir);                     ///< Restack clients
-void subClientArrange(SubClient *c, int gravity,
-  int screen);                                                    ///< Arrange client
+void subClientArrange(SubClient *c, int gravityid,
+  int screenid);                                                  ///< Arrange client
 void subClientToggle(SubClient *c, int type, int gravity);        ///< Toggle client state
 void subClientSetStrut(SubClient *c);                             ///< Set client strut
 void subClientSetProtocols(SubClient *c);                         ///< Set client protocols