GDK-Win32: Fix AeroSnap indicator and positioning

Merged Chun-wei Fan requested to merge fix-aerosnap-4 into master


This will attempt to fix AeroSnap on Windows by doing the following:

  • Ensure that we consider the DPI scale factor when we place the final surface during an AeroSnap operation, so that they will be placed correctly on HiDPI systems.

  • Fix snap up, by using the current X coordinate of the (toplevel) surface to determine the X coordinate to place the final surface. This means the X coordinate of the surface should not change but the height of the surface should stretch from the top to the bottom of the screen. Likewise, draw the AeroSnap indicator in the correct position by using the current X coordinate of the surface where the AeroSnap operation is being carried out.

  • In the snap_*() functions, rename all window variables to surface, for better consistency.

This will apply also for gtk-4-2.

With blessings, thank you!

Edited by Chun-wei Fan

Merge request reports