summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2019-05-23 12:47:16 -0400
committerVictor Kareh <[email protected]>2019-06-05 10:49:37 -0400
commit3c8f71bcee1ad79266ff2e2ddbd679364c617164 (patch)
tree724eecde8e06c28dd3614879de331b251a089dc1 /src/ui
parent4666622743b138764a281da908ef88981b5dc31a (diff)
downloadmarco-3c8f71bcee1ad79266ff2e2ddbd679364c617164.tar.bz2
marco-3c8f71bcee1ad79266ff2e2ddbd679364c617164.tar.xz
theme: don't add invisible borders for windows that can't be resized
Invisible borders are all about resizing -- in the case that a window cannot be resized, it makes no sense to add them. https://bugzilla.gnome.org/show_bug.cgi?id=659854 Based on mutter commit: https://git.gnome.org/browse/mutter/commit/?id=be9f7d77292c1dfd868640fe95f7223fbbfd4273 upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/64615667
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/theme.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/ui/theme.c b/src/ui/theme.c
index 1e9f4196..392daeb5 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -409,6 +409,12 @@ meta_frame_layout_get_borders (const MetaFrameLayout *layout,
{
int buttons_height, title_height;
+ meta_frame_borders_clear (borders);
+
+ /* For a full-screen window, we don't have any borders, visible or not. */
+ if (flags & META_FRAME_FULLSCREEN)
+ return;
+
g_return_if_fail (layout != NULL);
if (!layout->has_title)
@@ -425,16 +431,17 @@ meta_frame_layout_get_borders (const MetaFrameLayout *layout,
borders->visible.right = layout->right_width;
borders->visible.bottom = layout->bottom_height;
- if (flags & META_FRAME_FULLSCREEN)
+ if (flags & META_FRAME_ALLOWS_HORIZONTAL_RESIZE)
{
- meta_frame_borders_clear (borders);
- return;
+ borders->invisible.left = layout->invisible_border.left;
+ borders->invisible.right = layout->invisible_border.right;
}
- borders->invisible.left = layout->invisible_border.left;
- borders->invisible.right = layout->invisible_border.right;
- borders->invisible.bottom = layout->invisible_border.bottom;
- borders->invisible.top = layout->invisible_border.top;
+ if (flags & META_FRAME_ALLOWS_VERTICAL_RESIZE)
+ {
+ 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;