]> Dogcows Code - chaz/openbox/commitdiff
don't crash from very short windows
authorDana Jansens <danakj@orodu.net>
Fri, 20 Jul 2007 20:13:15 +0000 (16:13 -0400)
committerDana Jansens <danakj@orodu.net>
Fri, 20 Jul 2007 20:13:15 +0000 (16:13 -0400)
openbox/frame.c

index 93dbefedef3bfb543fd5a2493d43d9e61d2367f8..cefa389e50b58d6362ccfb78020313d5cc88b929 100644 (file)
@@ -717,7 +717,10 @@ void frame_adjust_area(ObFrame *self, gboolean moved,
                 XUnmapWindow(ob_display, self->handle);
             }
 
-            if (self->bwidth && !self->max_horz) {
+            if (self->bwidth && !self->max_horz &&
+                (self->client->area.height + self->size.top +
+                 self->size.bottom) > ob_rr_theme->grip_width * 2)
+            {
                 XMoveResizeWindow(ob_display, self->left,
                                   0,
                                   self->bwidth + ob_rr_theme->grip_width,
@@ -730,7 +733,10 @@ void frame_adjust_area(ObFrame *self, gboolean moved,
             } else
                 XUnmapWindow(ob_display, self->left);
 
-            if (self->bwidth && !self->max_horz) {
+            if (self->bwidth && !self->max_horz &&
+                (self->client->area.height + self->size.top +
+                 self->size.bottom) > ob_rr_theme->grip_width * 2)
+            {
                 XMoveResizeWindow(ob_display, self->right,
                                   self->client->area.width + self->cbwidth_l +
                                   self->cbwidth_r + self->bwidth,
This page took 0.026609 seconds and 4 git commands to generate.