diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-07-28 07:19:47 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-07-28 07:19:47 +0000 |
| commit | eb1fb5580e6a4c3620dfefdfd5704f9927f82ab1 (patch) | |
| tree | ad0076ac9f69ba495b3af1ff584d1e50b2885168 /openbox/client.c | |
| parent | 7da335f944257f81e2adfe7924430d1996d1af6d (diff) | |
keep apps from moving/maping their titlebar underneath left/top panels
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; |
