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
This commit is contained in:
Jasper St. Pierre 2011-09-22 14:17:01 -04:00
parent aab0d2f54e
commit 764569eb7a

View File

@ -4154,10 +4154,10 @@ adjust_for_gravity (MetaWindow *window,
if (borders) if (borders)
{ {
child_x = borders->total.left; child_x = borders->visible.left;
child_y = borders->total.top; child_y = borders->visible.top;
frame_width = child_x + rect->width + borders->total.left; frame_width = child_x + rect->width + borders->visible.right;
frame_height = child_y + rect->height + borders->total.top; frame_height = child_y + rect->height + borders->visible.bottom;
} }
else else
{ {