GDK/Win32: Fix modal window handling and window stacking (for GTK4)

Chun-wei Fan requested to merge win32.modal into master


This MR attempts to resolve some issues on the GDK/Win32 backend, namely:

  • Make sure we grab and apply the properties for a modal window properly. This will ensure that the window focus will not get messed on Windows as we didn't handle the modal window property properly

  • Forward port MR !1769 (merged) for GTK4, as the issues that MR mentioned is even more apparent in GTK master

  • Attempt to fix the situations where mouse pointer is not captured by the newly-created modal window, and where the window that activated a transient window does not regain mouse pointer capture when the transient window is destroyed.

We still need to fix the handling of pointer grabs when a new window is opened, and keyboard handling, in GTK4, likely in another MR.

With blessings, thank you!

Edited by Chun-wei Fan

Merge request reports