mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
x11: Fix dnd coordinate handling
We were not properly converting the coordinates we got to root coordinates. This was showing up as offsets between the actual drop target and the area where drops can happen, e.g. when dragging over a stack switcher to switch pages.
This commit is contained in:
parent
14122d1acb
commit
7c1cfc5533
@ -2073,8 +2073,12 @@ _gdk_x11_surface_drag_begin (GdkSurface *surface,
|
||||
precache_target_list (drag);
|
||||
|
||||
gdk_device_get_position (device, &px, &py);
|
||||
x_root = round (px) + dx;
|
||||
y_root = round (py) + dy;
|
||||
|
||||
gdk_x11_surface_get_root_coords (surface,
|
||||
round (px) + dx,
|
||||
round (py) + dy,
|
||||
&x_root,
|
||||
&y_root);
|
||||
|
||||
x11_drag->start_x = x_root;
|
||||
x11_drag->start_y = y_root;
|
||||
|
Loading…
Reference in New Issue
Block a user