]> Dogcows Code - chaz/openbox/commitdiff
cap the client (and frame) window's dimensions at the range of an unsigned short...
authorDana Jansens <danakj@orodu.net>
Wed, 20 Oct 2010 19:30:29 +0000 (15:30 -0400)
committerDana Jansens <danakj@orodu.net>
Mon, 24 Jan 2011 19:19:23 +0000 (14:19 -0500)
openbox/client.c

index cccc59dbae593b9440ec48f1c5d62f86dfff70e8..0b03d9d2f967d864511b947822dfbdae83176c70 100644 (file)
@@ -2874,6 +2874,13 @@ void client_try_configure(ObClient *self, gint *x, gint *y, gint *w, gint *h,
        the updated frame dimensions. */
     frame_adjust_area(self->frame, FALSE, TRUE, TRUE);
 
+    /* cap any X windows at the size of an unsigned short */
+    *w = MIN(*w,
+             G_MAXUSHORT - self->frame->size.left - self->frame->size.right);
+    *h = MIN(*h,
+             G_MAXUSHORT - self->frame->size.top - self->frame->size.bottom);
+
+
     /* gets the frame's position */
     frame_client_gravity(self->frame, x, y);
 
This page took 0.027448 seconds and 4 git commands to generate.