summaryrefslogtreecommitdiff
path: root/src/ui/theme.c
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2019-05-23 11:52:34 -0400
committerraveit65 <[email protected]>2019-06-16 18:12:44 +0200
commita0461b58188917ee5c252b4efde55d2aee01aae1 (patch)
tree364460bf90ac7b771ede7403e1f018d111992818 /src/ui/theme.c
parent2ebdf88ca21f48f25451777a4871dd854dda0d91 (diff)
downloadmarco-a0461b58188917ee5c252b4efde55d2aee01aae1.tar.bz2
marco-a0461b58188917ee5c252b4efde55d2aee01aae1.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
Diffstat (limited to 'src/ui/theme.c')
-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 be6b7a5d..9a7bf455 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;