summaryrefslogtreecommitdiff
path: root/src/core/window.c
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2019-05-23 12:41:11 -0400
committerraveit65 <[email protected]>2019-06-16 18:12:44 +0200
commit6c035dbf928b04e054e6756ac312d981970ccf7f (patch)
treec6f7f5138c11e906b4ccc65cd9a2b9259486f108 /src/core/window.c
parenta0461b58188917ee5c252b4efde55d2aee01aae1 (diff)
downloadmarco-6c035dbf928b04e054e6756ac312d981970ccf7f.tar.bz2
marco-6c035dbf928b04e054e6756ac312d981970ccf7f.tar.xz
window: Fix window placement to exclude invisible borders
A window can specify geometry that it is placed at. We need to exclude invisible borders when calculating where to place the window, otherwise the window will have a strange offset. https://bugzilla.gnome.org/show_bug.cgi?id=659848 upstream commit: https://gitlab.gnome.org/GNOME/metacity/commit/95373187
Diffstat (limited to 'src/core/window.c')
-rw-r--r--src/core/window.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/window.c b/src/core/window.c
index 4422d797..132cbde0 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -3267,10 +3267,10 @@ adjust_for_gravity (MetaWindow *window,
if (borders)
{
- child_x = borders->total.left;
- child_y = borders->total.top;
- frame_width = child_x + rect->width + borders->total.left;
- frame_height = child_y + rect->height + borders->total.top;
+ child_x = borders->visible.left;
+ child_y = borders->visible.top;
+ frame_width = child_x + rect->width + borders->visible.right;
+ frame_height = child_y + rect->height + borders->visible.bottom;
}
else
{