summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2019-05-23 11:52:34 -0400
committerVictor Kareh <[email protected]>2019-06-05 10:49:37 -0400
commit1b208551f052d980439cef7aa31b133d4a0c9c75 (patch)
treebd674d7aed3c2216f8681c566e89a78eeff36541
parent3ae9bd794e270249da1d59a2d41bc6ccad88ed61 (diff)
downloadmarco-1b208551f052d980439cef7aa31b133d4a0c9c75.tar.bz2
marco-1b208551f052d980439cef7aa31b133d4a0c9c75.tar.xz
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
-rw-r--r--src/ui/theme.c8
1 files 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;