GDK-Win32: Force toplevel surfaces to configure as needed (fix issues #3728 and #3799)

Merged Chun-wei Fan requested to merge fix-3728-3799 into main


This makes the toplevel surface subject to constant reconfiguration after it has been initially created and presented, unless it underwent AeroSnap operations or it has been maximized.

Note that this is WIP as I need to find a way to make messages such as

(gtk4-demo:7844): Gtk-CRITICAL **: 18:54:18.157: Allocation width too small. Tried to allocate 522x112, but GtkBox 0000019E2CDAA1F0 needs at least 580x112.

(gtk4-demo:7844): Gtk-CRITICAL **: 18:54:18.207: Allocation width too small. Tried to allocate 486x36, but DemoTaggedEntry 0000019E2CDAA360 needs at least 544x36.

go away when using the demos that were mentioned in #3799 (closed) and #3728 (closed), but the demos do show things properly after the updates here.

This MR will also fix some AeroSnap issues in GTK4, notably snapping upwards and indicator drawing and surface placement on HiDPI. (the AeroSnap issues are being addressed in MR !3795 (merged) instead, for records)

This fixes issues #3799 (closed) and #3728 (closed).

With blessings, thank you!

Edited by Chun-wei Fan

Merge request reports