]> Dogcows Code - chaz/openbox/commitdiff
let you put windows with the titlebar off screen.. for mikachu.
authorDana Jansens <danakj@orodu.net>
Sat, 10 Mar 2007 00:44:43 +0000 (00:44 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 10 Mar 2007 00:44:43 +0000 (00:44 +0000)
but also don't let applications put themselves under the struts!

openbox/client.c

index 682de02af540536e24238e7edd6b534708cd2635..bf5c8bec06f1aed275910664657e82b6c443390a 100644 (file)
@@ -721,8 +721,8 @@ gboolean client_find_onscreen(ObClient *self, gint *x, gint *y, gint w, gint h,
             *y = a->y + a->height - self->frame->area.height/10;
         if (!self->strut.left && *x + self->frame->area.width*9/10 - 1 < a->x)
             *x = a->x - self->frame->area.width*9/10;
-        if (!self->strut.top && *y < a->y)
-            *y = a->y;
+        if (!self->strut.top && *y + self->frame->area.height*9/10 - 1 < a->y)
+            *y = a->y - self->frame->area.width*9/10;
     }
 
     /* This here doesn't let windows even a pixel outside the screen,
@@ -735,7 +735,7 @@ gboolean client_find_onscreen(ObClient *self, gint *x, gint *y, gint w, gint h,
         /* avoid the xinerama monitor divide while we're at it,
          * remember to fix the placement stuff to avoid it also and
          * then remove this XXX */
-        a = screen_physical_area_monitor(client_monitor(self));
+        a = screen_area(self->desktop);
         /* dont let windows map into the strut unless they
            are bigger than the available area */
         if (w <= a->width) {
This page took 0.025427 seconds and 4 git commands to generate.