summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>2015-01-18 17:02:18 +0200
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2015-01-19 15:18:35 +0200
commit7a8372c1e43d63add04891a6eb6f4d0b7b956dae (patch)
tree722b4d14df420af9f050757cdd03c8081ac79696
parentf449f785e52bf3ff5ae24bbc6bc42511da68f59d (diff)
downloadmetacity-7a8372c1e43d63add04891a6eb6f4d0b7b956dae.tar.gz
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
-rw-r--r--src/ui/theme.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/ui/theme.c b/src/ui/theme.c
index 82cae7e9..af65681f 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -410,6 +410,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)
@@ -426,22 +432,19 @@ 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 (type == META_FRAME_TYPE_ATTACHED)
- borders->invisible.top = 0;
+ if (flags & META_FRAME_ALLOWS_VERTICAL_RESIZE)
+ {
+ borders->invisible.bottom = layout->invisible_border.bottom;
- if (flags & META_FRAME_SHADED)
- borders->visible.bottom = borders->invisible.bottom = 0;
+ if (type != META_FRAME_TYPE_ATTACHED)
+ borders->invisible.top = layout->invisible_border.top;
+ }
borders->total.left = borders->invisible.left + borders->visible.left;
borders->total.right = borders->invisible.right + borders->visible.right;