[gtk+] wayland: Fix "fake root" coords
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wayland: Fix "fake root" coords
- Date: Mon, 17 Mar 2014 19:37:01 +0000 (UTC)
commit 0320c3be8e2be4f1d7c2b2465089e71fd43d8b53
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Mar 17 15:27:13 2014 -0400
wayland: Fix "fake root" coords
We were incorrectly summing up our own window over and over
rather than the coordinates of the parent windows.
gdk/wayland/gdkwindow-wayland.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index 9e4c07e..b6d3811 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -1098,21 +1098,17 @@ gdk_wayland_window_get_fake_root_coords (GdkWindow *window,
gint *x_out,
gint *y_out)
{
- GdkWindowImplWayland *impl, *parent_impl;
- GdkWindow *parent_window;
gint x_offset = 0, y_offset = 0;
- impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
-
- parent_window = impl->transient_for;
- while (parent_window)
+ while (window)
{
- parent_impl = GDK_WINDOW_IMPL_WAYLAND (parent_window->impl);
+ GdkWindowImplWayland *impl;
x_offset += window->x;
y_offset += window->y;
- parent_window = parent_impl->transient_for;
+ impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
+ window = impl->transient_for;
}
*x_out = x_offset;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]