[gtk+] gdkwindow: Always pass the impl window to GdkWindowImpl::get_root_coords



commit 0f212b5fb7f311ac54e98f8bd86874b5ac86a1e1
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Feb 27 21:02:22 2014 -0500

    gdkwindow: Always pass the impl window to GdkWindowImpl::get_root_coords
    
    The point of GdkWindowImpl::get_root_coords is to translate the passed
    in coordinates against the passed-in impl window. For a child window,
    in fact, window->abs_x and window->abs_y already track the child
    window's coordinates against the impl window.
    
    If we pass in a child window, and backends don't explicitly get the impl
    window from it, we'll double-count the child window.
    
    Really, we should *always* be passing impl windows to backends, and
    never child windows. However, I'm a bit worried for regressions late
    in the cycle if we want to fix up the rest of the callers, like
    gdk_window_get_geometry, so I'm only going to touch get_root_coords
    for now after careful review of all the backends.

 gdk/gdkwindow.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index f02eb82..1a22cd7 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -6149,7 +6149,7 @@ gdk_window_get_origin (GdkWindow *window,
     }
 
   impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
-  impl_class->get_root_coords (window,
+  impl_class->get_root_coords (window->impl_window,
                               window->abs_x,
                               window->abs_y,
                               x, y);
@@ -6191,7 +6191,7 @@ gdk_window_get_root_coords (GdkWindow *window,
     }
   
   impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
-  impl_class->get_root_coords (window,
+  impl_class->get_root_coords (window->impl_window,
                               x + window->abs_x,
                               y + window->abs_y,
                               root_x, root_y);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]