From eb1fb5580e6a4c3620dfefdfd5704f9927f82ab1 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 28 Jul 2003 07:19:47 +0000 Subject: keep apps from moving/maping their titlebar underneath left/top panels --- openbox/client.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'openbox/client.c') 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; -- cgit v1.2.3