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
This commit is contained in:
Florian Müllner 2015-03-13 13:52:05 +01:00
parent 68ba45bcb2
commit 67a30b7a89

View File

@ -1078,9 +1078,10 @@ meta_window_x11_move_resize_internal (MetaWindow *window,
/* Compute new frame size */ /* Compute new frame size */
new_w = window->rect.width + borders.invisible.left + borders.invisible.right; new_w = window->rect.width + borders.invisible.left + borders.invisible.right;
new_h = borders.invisible.top + borders.invisible.bottom; if (window->shaded)
if (!window->shaded) new_h = borders.total.top + borders.total.bottom;
new_h += window->rect.height; else
new_h = window->rect.height + borders.invisible.top + borders.invisible.bottom;
if (new_w != window->frame->rect.width || if (new_w != window->frame->rect.width ||
new_h != window->frame->rect.height) new_h != window->frame->rect.height)