Skip to content

GDK-Win32: Fix drag surface positioning (issue #3798)

Chun-wei Fan requested to merge fix-3798 into master

Hi,

From the commit message, in an attempt to fix issue #3798 (closed):

Adjust the coordinates of where the drag surface using gdk_win32_surface_get_root_coords(), so that drag surfaces are positioned correctly. ...

Determine the root_x and root_y coordinates of the drag surface by relying on the coordinates of the surface where the drag is being carried out, plus the coordinates that we receive from the drag event, which is in-line with what the X11 backend does.

This will prevent the drag surface from being initially drawn at the correct position, but jumping towards the top-left corner of the screen shortly afterwards.

The DnD support will still need some more updates to function correctly on Windows, but at least this is a small improvement.

This will apply for the gtk-4-2 branch as well.

With blessings, thank you!

Edited by Chun-wei Fan

Merge request reports