From 67a30b7a89d65e18c4f64b48f5c530341220ffbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 13 Mar 2015 13:52:05 +0100 Subject: [PATCH] window-x11: Fix height computation of shaded windows Since commit 6e06648f7, we start out with the invisible frame parts only, and then add the unconstrained rect's height (which consists of the visible parts of both frame and client window) *unless* the window is shaded. While we indeed don't want to add the client height in that case, we need to explicitly include the visible frame parts now. https://bugzilla.gnome.org/show_bug.cgi?id=746145 --- src/x11/window-x11.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c index ec3656ec0..f37be2620 100644 --- a/src/x11/window-x11.c +++ b/src/x11/window-x11.c @@ -1078,9 +1078,10 @@ meta_window_x11_move_resize_internal (MetaWindow *window, /* Compute new frame size */ new_w = window->rect.width + borders.invisible.left + borders.invisible.right; - new_h = borders.invisible.top + borders.invisible.bottom; - if (!window->shaded) - new_h += window->rect.height; + if (window->shaded) + new_h = borders.total.top + borders.total.bottom; + else + new_h = window->rect.height + borders.invisible.top + borders.invisible.bottom; if (new_w != window->frame->rect.width || new_h != window->frame->rect.height)