all repos — openbox @ 44802ea327236a310b9a6f13dd72b3671825781b

openbox fork - make it a bit more like ryudo

fix for acroread - don't shrink windows when they specifically fit an entire monitor
Dana Jansens danakj@orodu.net
commit

44802ea327236a310b9a6f13dd72b3671825781b

parent

7c7bfd770d4fa0d83324619110b4056b4434fe80

1 files changed, 13 insertions(+), 6 deletions(-)

jump to
M openbox/client.copenbox/client.c

@@ -403,26 +403,33 @@ (!(self->sized & USSize || self->positioned & USPosition) &&

client_normal(self) && !self->session))) { - Rect placer; + Rect *monitor, *a, placer; + + monitor = screen_physical_area_monitor(client_monitor(self)); RECT_SET(placer, placex, placey, placew, placeh); frame_rect_to_frame(self->frame, &placer); - Rect *a = screen_area(self->desktop, SCREEN_AREA_ONE_MONITOR, &placer); + a = screen_area(self->desktop, SCREEN_AREA_ONE_MONITOR, &placer); /* shrink by the frame's area */ a->width -= self->frame->size.left + self->frame->size.right; a->height -= self->frame->size.top + self->frame->size.bottom; - /* fit the window inside the area */ - if (placew > a->width || self->area.height > a->height) { + /* fit the window inside the area + but, don't shrink oldschool fullscreen windows to fit inside the + struts (fixes Acroread, which makes its fullscreen window + fit the screen but it is not USSize'd or USPosition'd) */ + if ((placew > a->width || self->area.height > a->height) && + !(self->decorations == 0 && RECT_EQUAL(placer, *monitor))) + { placew = MIN(self->area.width, a->width); placeh = MIN(self->area.height, a->height); - ob_debug("setting window size to %dx%d\n", - self->area.width, self->area.height); + ob_debug("setting window size to %dx%d\n", placew, placeh); } g_free(a); + g_free(monitor); }