- 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 fixes a bunch of issues with dialogs on Windows.
- Removed lpstrFileTitle assignation, which overwrote the buffer
- Increased the memory size available for long file selections
- Removed seemingly unused `default_folder` in win_Args struct
- Properly handle the case where only one file is selected in multiselect mode
- Properly handle the initial folder, which would fail in specific conditions
The details for the last entry are explained in a comment in the code.
/ZW is incompatible with C++20, so disable the #error in that case. In addition, define a main function because UWP in C++20 mode links to standard main.
https://developer.android.com/reference/android/content/ComponentCallbacks#onLowMemory()
> Preferably, you should implement ComponentCallbacks2#onTrimMemory from ComponentCallbacks2 [...].
> That API is available for API level 14 and higher, so you should only use this onLowMemory() method as a fallback for older versions.
Since the SDL3 min api level is 19, there's no need for `onLowMemory()` compat.
LINUX_JoystickInit does a manual scan first so devices are sorted.
If SDL_UDEV_Init hasn't run by then, then the product info cannot
be looked up by SDL_UDEV_GetProductInfo and the initial-plugged-
in-device classification falls back to heuristic guessing.
(cherry picked from commit 0963c11af8)
Replacing function call `kill(0, SIGINT);` with `(void)raise(SIGINT);` in file test/testlock.c.
The `kill()` function is not available on Unix systems when compiling without system extensions enabled.
Closing a device file takes 0.01 to 0.5s, which can add up to
significant startup delays. The udev classification does not
require opening the actual device files, so, use it if possible,
and only fall back to opening the device and probing otherwise.
(cherry picked from commit 45b804c158)
The idea is that if you have a `typedef Uint32 MyFlags` that has a bunch of
defines that are meant to be bitflags, you can pack them into the same wiki
page automatically.
This only works with `typedef`s that are _not_ struct/union/enums, and it
only pulls in `#define` lines that immediately follow the typedef line.
Even a blank line or a comment will signal to stop including lines for
this page!
Some backends, such as Wayland, don't support explicit mouse capture, and thus don't implement the backend function to do so, but do set/unset the capture flag on button events to handle cases where a button is pressed and the pointer is dragged outside the window.
If the backend doesn't support explicitly setting the mouse capture mode, manually clear the capture flag when the window has had the focus forcibly removed, to avoid sending bogus motion events as well as an assert condition.