avoids -Wformat warnings from mingw toolchains -- e.g.:
src/test/SDL_test_harness.c:581:37: warning: unknown conversion type character 'l' in format [-Wformat=]
Borderless windows flagged as fullscreen at creation time turn on the borders, because doing so prevents some window managers from wrongly positioning the borderless window, and in these cases the borders need to be removed whether fullscreen is exited programmatically or via a compositor event. Set a flag when forcing the borders on, so they will be removed in all cases later.
The 'all-in-one' test fails for Emscripten because try_compile does not copy back the actual binary:
the wasm file contains the machine parseable strings, not the html or js file(s).
Custom theme file exists in project, but is not used by app, which is kinda unintuitive. Using it by default so people who not familiar with Android development won't spend lots of time troubleshooting.
/tmp/SDL3/src/video/windows/SDL_windowswindow.c: In function 'WIN_SetWindowPositionInternal':
/tmp/SDL3/src/video/windows/SDL_windowswindow.c:216:17: warning: 'h' may be used uninitialized in this function [-Wmaybe-uninitialized]
rect.bottom = *height;
~~~~~~~~~~~~^~~~~~~~~
/tmp/SDL3/src/video/windows/SDL_windowswindow.c:320:12: note: 'h' was declared here
int w, h;
^
/tmp/SDL3/src/video/windows/SDL_windowswindow.c:215:16: warning: 'w' may be used uninitialized in this function [-Wmaybe-uninitialized]
rect.right = *width;
~~~~~~~~~~~^~~~~~~~
/tmp/SDL3/src/video/windows/SDL_windowswindow.c:320:9: note: 'w' was declared here
int w, h;
^
This reverts commit 2de2e9d031.
The fullscreen state is no longer available to check, and the actual bug this was trying to work around was fixed in ad813a65e7
Note that Wayland places a restriction on windows being resized, where the requested size passed to the configuration event is a maximum, and attempting to exceed it is a protocol violation, so trying to grow the window by dragging the sides only vertically or horizontally is limited, as the provided dimensions can't be exceeded.
In practice, nothing seems to kill clients that do this, but the more immediate problem is that doing so causes GNOME to glitch out.
We're seeing people with legit PipeWire installs that don't export any
devices, that are also running a (not emulated) PulseAudio install that
works.
This solution might still get tweaked some more, but it seems to be working
so far.
The HDR properties are zeroed and set in WIN_GetHDRProperties, and using the struct without calling this function results in sending uninitialized data.
In file included from /tmp/SDL3/src/events/SDL_events_c.h:28,
from /tmp/SDL3/src/SDL.c:46:
/tmp/SDL3/src/events/../video/SDL_sysvideo.h:31: error: redefinition of typedef 'SDL_VideoDevice'
/tmp/SDL3/src/video/SDL_video_c.h:27: note: previous declaration of 'SDL_VideoDevice' was here