diff options
| author | Dana Jansens <danakj@orodu.net> | 2010-10-20 15:30:29 -0400 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2011-01-24 14:19:23 -0500 |
| commit | 4e3ffbfc281a1e738838fd4859ac691ccea91a87 (patch) | |
| tree | b4d14dc85ea4f35f1f46ab500997970952ae3ff5 /openbox/client.c | |
| parent | 9c4ef9aa4a02c15d4257ab2b61150f021baf81b2 (diff) | |
cap the client (and frame) window's dimensions at the range of an unsigned short (bug #4596)
Diffstat (limited to 'openbox/client.c')
| -rw-r--r-- | openbox/client.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/openbox/client.c b/openbox/client.c index cccc59db..0b03d9d2 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -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); |
