From 1b208551f052d980439cef7aa31b133d4a0c9c75 Mon Sep 17 00:00:00 2001 From: Victor Kareh Date: Thu, 23 May 2019 11:52:34 -0400 Subject: theme: Don't add any bottom border to shaded windows Shaded windows are assumed to be reduced to the titlebar: the current code enforces a visible bottom border of 0 and only takes the size of the title bar (+ invisible top border) into account when resizing the frame. However, we still add an invisible border at the bottom, which is than subtracted from the title bar, resulting in shaded windows being cut off. Fix by forcing both visible and invisible bottom borders to 0. https://bugzilla.gnome.org/show_bug.cgi?id=659266 upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/7a80fcfd --- src/ui/theme.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ui/theme.c b/src/ui/theme.c index 773ab0a5..1e9f4196 100644 --- a/src/ui/theme.c +++ b/src/ui/theme.c @@ -423,10 +423,7 @@ meta_frame_layout_get_borders (const MetaFrameLayout *layout, borders->visible.top = MAX (buttons_height, title_height); borders->visible.left = layout->left_width; borders->visible.right = layout->right_width; - if (flags & META_FRAME_SHADED) - borders->visible.bottom = 0; - else - borders->visible.bottom = layout->bottom_height; + borders->visible.bottom = layout->bottom_height; if (flags & META_FRAME_FULLSCREEN) { @@ -439,6 +436,9 @@ meta_frame_layout_get_borders (const MetaFrameLayout *layout, borders->invisible.bottom = layout->invisible_border.bottom; borders->invisible.top = layout->invisible_border.top; + if (flags & META_FRAME_SHADED) + borders->visible.bottom = borders->invisible.bottom = 0; + borders->total.left = borders->invisible.left + borders->visible.left; borders->total.right = borders->invisible.right + borders->visible.right; borders->total.bottom = borders->invisible.bottom + borders->visible.bottom; -- cgit v1.2.1