Add support for modal windows to more platforms

- Adds support for modal windows to Win32, Mac, and Haiku, and enhances functionality on Wayland and X11, which previous set only the parent window, but not the modal state.
- Windows can be declared modal at creation time, and the modal state can be toggled at any time via SDL_SetWindowModalFor() (tested with UE5 through sdl2-compat).
- Allows dynamic unparenting/reparenting of windows.
- Includes a modal window test.
This commit is contained in:
Semphris
2024-04-03 16:44:03 -04:00
committed by Frank Praznik
parent 97f7b4620a
commit c6a70d6898
20 changed files with 592 additions and 51 deletions

View File

@@ -414,6 +414,7 @@ add_sdl_test_executable(testpopup SOURCES testpopup.c)
add_sdl_test_executable(testdialog SOURCES testdialog.c)
add_sdl_test_executable(testtime SOURCES testtime.c)
add_sdl_test_executable(testmanymouse SOURCES testmanymouse.c)
add_sdl_test_executable(testmodal SOURCES testmodal.c)
if (HAVE_WAYLAND)
# Set the GENERATED property on the protocol file, since it is first created at build time