]> Dogcows Code - chaz/openbox/commitdiff
round down for size increments
authorDana Jansens <danakj@orodu.net>
Fri, 28 Mar 2003 09:40:55 +0000 (09:40 +0000)
committerDana Jansens <danakj@orodu.net>
Fri, 28 Mar 2003 09:40:55 +0000 (09:40 +0000)
plugins/resistance.c

index 2b7bd1dff67e81340d9ec9f84c4470350abdd5f3..a92047af0da1dbbafe1f77fef31ec56522a690b0 100644 (file)
@@ -255,6 +255,15 @@ static void resist_size(Client *c, int *w, int *h, Corner corn)
             *h = rb - al + 1;
         break;
     }
+
+    /* round down for size increments */
+    *w -= c->frame->area.width + c->frame->size.left + c->frame->size.right;
+    *w = *w / c->size_inc.width * c->size_inc.width;
+    *w += c->frame->area.width + c->frame->size.left + c->frame->size.right;
+
+    *h -= c->frame->area.height + c->frame->size.top + c->frame->size.bottom;
+    *h = *h / c->size_inc.height * c->size_inc.height;
+    *h += c->frame->area.height + c->frame->size.top + c->frame->size.bottom;
 }
 
 static void event(ObEvent *e, void *foo)
This page took 0.023441 seconds and 4 git commands to generate.