mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
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.
This commit is contained in:
parent
b922e0e213
commit
0f212b5fb7
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user