diff options
Diffstat (limited to 'openbox/client.c')
| -rw-r--r-- | openbox/client.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/openbox/client.c b/openbox/client.c index a961c149..697b6d8a 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -891,7 +891,22 @@ void client_update_normal_hints(ObClient *self) /* get the hints from the window */ if (XGetWMNormalHints(ob_display, self->window, &size, &ret)) { - self->positioned = !!(size.flags & (PPosition|USPosition)); + if (size.flags & (PPosition|USPosition)) { + Rect *a; + + /* this is my MOZILLA BITCHSLAP. oh ya it fucking feels good. + Java can suck it too. */ + + /* dont let windows map above/left into the strut unless they + are bigger than the available area */ + a = screen_area(self->desktop); + if (self->area.width <= a->width && self->area.x < a->x) + self->area.x = a->x; + if (self->area.height <= a->height && self->area.y < a->y) + self->area.y = a->y; + + self->positioned = TRUE; + } if (size.flags & PWinGravity) { self->gravity = size.win_gravity; |
