From: Mikael Magnusson Date: Fri, 26 Sep 2014 08:45:17 +0000 (+0200) Subject: Allow clients to place themselves up to 99% offscreen. X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=579686212b2169a1f4dac1339bc85695f5761021;p=mikachu%2Fopenbox.git Allow clients to place themselves up to 99% offscreen. Really what I want is keep the 10% but let them stay if they were already there. Most noticably steam jumps back to the 10% limit whenever you click anywhere because it stupidly moves itself to where it already is when you click anywhere inside it. --- diff --git a/openbox/client.c b/openbox/client.c index 323f7276..07ffbbfb 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -1169,14 +1169,14 @@ gboolean client_find_onscreen(ObClient *self, gint *x, gint *y, gint w, gint h, only limiting the application. */ if (client_normal(self)) { - if (!self->strut.right && *x + fw/10 >= a->x + a->width - 1) - *x = a->x + a->width - fw/10; - if (!self->strut.bottom && *y + fh/10 >= a->y + a->height - 1) - *y = a->y + a->height - fh/10; - if (!self->strut.left && *x + fw*9/10 - 1 < a->x) - *x = a->x - fw*9/10; - if (!self->strut.top && *y + fh*9/10 - 1 < a->y) - *y = a->y - fh*9/10; + if (!self->strut.right && *x + fw/100 >= a->x + a->width - 1) + *x = a->x + a->width - fw/100; + if (!self->strut.bottom && *y + fh/100 >= a->y + a->height - 1) + *y = a->y + a->height - fh/100; + if (!self->strut.left && *x + fw*99/100 - 1 < a->x) + *x = a->x - fw*99/100; + if (!self->strut.top && *y + fh*99/100 - 1 < a->y) + *y = a->y - fh*99/100; } /* This here doesn't let windows even a pixel outside the