summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2011-09-22 14:17:01 -0400
committerJasper St. Pierre <jstpierre@mecheye.net>2011-09-24 13:21:25 -0400
commit764569eb7a020545e475ffe11f12cb468adae7a6 (patch)
tree54570fe37717a0b1f0b6cb2e43ea13d6b764ef9d
parentaab0d2f54e639c053b10104d29b5aaf5ec539a50 (diff)
downloadmutter-764569eb7a020545e475ffe11f12cb468adae7a6.tar.gz
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
-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 57761acae..8b2820e8e 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -4154,10 +4154,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
{