[metacity/wip/gtk-theme: 31/52] window: Fix window placement to exclude invisible borders
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity/wip/gtk-theme: 31/52] window: Fix window placement to exclude invisible borders
- Date: Wed, 7 Jan 2015 12:37:02 +0000 (UTC)
commit 6b6863781d205b551f0044608c91d92394fbface
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Sep 22 14:17:01 2011 -0400
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
src/core/window.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 23fb504..3e2dbc8 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -3139,10 +3139,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
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]