forked from AuroraMiddleware/gtk
wayland: Fix "fake root" coords
We were incorrectly summing up our own window over and over rather than the coordinates of the parent windows.
This commit is contained in:
parent
494e253e47
commit
0320c3be8e
@ -1098,21 +1098,17 @@ gdk_wayland_window_get_fake_root_coords (GdkWindow *window,
|
|||||||
gint *x_out,
|
gint *x_out,
|
||||||
gint *y_out)
|
gint *y_out)
|
||||||
{
|
{
|
||||||
GdkWindowImplWayland *impl, *parent_impl;
|
|
||||||
GdkWindow *parent_window;
|
|
||||||
gint x_offset = 0, y_offset = 0;
|
gint x_offset = 0, y_offset = 0;
|
||||||
|
|
||||||
impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
while (window)
|
||||||
|
|
||||||
parent_window = impl->transient_for;
|
|
||||||
while (parent_window)
|
|
||||||
{
|
{
|
||||||
parent_impl = GDK_WINDOW_IMPL_WAYLAND (parent_window->impl);
|
GdkWindowImplWayland *impl;
|
||||||
|
|
||||||
x_offset += window->x;
|
x_offset += window->x;
|
||||||
y_offset += window->y;
|
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;
|
*x_out = x_offset;
|
||||||
|
Loading…
Reference in New Issue
Block a user