]> Dogcows Code - chaz/openbox/commitdiff
fix for how base-size is used to comply with the icccm
authorDana Jansens <danakj@orodu.net>
Thu, 19 Jun 2003 17:14:16 +0000 (17:14 +0000)
committerDana Jansens <danakj@orodu.net>
Thu, 19 Jun 2003 17:14:16 +0000 (17:14 +0000)
openbox/client.c

index 13cd7258c3db27ca439b1d00f8d394b0ef8047d7..249309094209cdab75f6b2d96e6a3c415beb2373 100644 (file)
@@ -1677,16 +1677,13 @@ void client_configure(Client *self, Corner anchor, int x, int y, int w, int h,
             minh = self->base_size.height;
         }
 
-        w -= basew;
-        h -= baseh;
-
         if (user) {
             /* for interactive resizing. have to move half an increment in each
                direction. */
 
             /* how far we are towards the next size inc */
-            int mw = w % self->size_inc.width; 
-            int mh = h % self->size_inc.height;
+            int mw = (w - basew) % self->size_inc.width; 
+            int mh = (h - baseh) % self->size_inc.height;
             /* amount to add */
             int aw = self->size_inc.width / 2;
             int ah = self->size_inc.height / 2;
@@ -1708,6 +1705,9 @@ void client_configure(Client *self, Corner anchor, int x, int y, int w, int h,
             if (h < minh) h = minh;
         }
 
+        w -= basew;
+        h -= baseh;
+
         /* keep to the increments */
         w /= self->size_inc.width;
         h /= self->size_inc.height;
This page took 0.027176 seconds and 4 git commands to generate.