commits
This was accidentally removed while deleting some associated dead code.
GetClientRect() returns old, incorrect size data for popup windows when called while processing the WM_WINDOWPOSCHANGED message, so use the WINDOWPOS data instead.
Popups can't be maximized or fullscreen, so no need to worry about a move event resizing them.
Now (only in the generic backend, where it is implemented), this hint is
always respected. Previously it would only be used if no windows were created,
to help reduce CPU load on things like loopwave.
Since it's always used now, the default has changed from 60 (Hz) to 0 (run as
fast as possible). Things like loopwave should still likely force this way
lower than the previous default (and already do: loopwave explicitly sets it
to 5).
The hint can now also be set to "waitevent" which will cause SDL_AppIterate
to only be called after new events have arrived, for apps that are entirely
driven by input and want to consume (almost) no power or CPU time until then.
Fixes #11093.
Fixes #11387.
Woops ended up doing GPU stuff instead, maybe after 3.2!
Fixes https://github.com/libsdl-org/SDL/issues/10528
Fixes https://github.com/libsdl-org/SDL/issues/9585
The point/pixel conversion functions should return zero when passed zero, or the min/max calculations can break.
Newer emscripten SDK does an unconditional #include <stdbool.h>,
which clashes with our custom bool.h typedef
Ran into this on a Huawei Y6 phone, where the back facing camera can generate 4160x2000 frames, but the maximum texture size was 4096x4096
Otherwise, on HiDPI displays (like a retina iPad), the lines you draw don't
match where the pen is touching.
This manages axes correctly across events, sorts out the math to convert from
Apple's data to what SDL expects, and a few other tweaks and corrections.
Reference Issue #9911.
Reference Issue #10516.
Don't apply the supplied dimensions if they haven't changed from the last configuration event, or a newer size set programmatically can be overwritten by old data.
This check is already being done for toplevel windows, but was never added to the popup configure event.
This addresses the issue #11762 by reading the biCompression field to
determine the correct size of the color table, and consequently the
correct bih_size value.
Fixes https://github.com/libsdl-org/SDL/issues/11760
src/tray/unix/SDL_tray.c: In function 'get_tmp_filename':
src/tray/unix/SDL_tray.c:345: warning: format '%ld' expects type 'long int', but argument 2 has type 'size_t'
src/tray/unix/SDL_tray.c: In function 'get_appindicator_id':
src/tray/unix/SDL_tray.c:361: warning: format '%ld' expects type 'long int', but argument 3 has type 'unsigned int'
python3-selenium does not seem to work on Ubuntu 24.04
Fixes libsdl-org/SDL#10099
Fixes libsdl-org/SDL#10096
Fixes libsdl-org/SDL#11628
See
https://cmake.org/cmake/help/latest/command/add_custom_command.html#example-generating-files-for-multiple-targets
Default to using the nearest monitor, instead of null, as a null monitor can be sent when restoring from minimized, which results in the restored, maximized window being the wrong size.
Even if a borderless window doesn't have resizable borders set, the WS_MAXIMIZEBOX property needs to be set on the window, or maximizing it will make it fullscreen and cover the taskbar, instead of only filling the usable desktop space, as is usually expected from a maximized window. This style property needs to be retained until the window is no longer maximized, even if the resize flag is toggled off, or restoring from minimized can fail.
This isn't reliable for third party controllers like the 8BitDo Pro 2.
Fixes https://github.com/libsdl-org/SDL/issues/10862
Now (only in the generic backend, where it is implemented), this hint is
always respected. Previously it would only be used if no windows were created,
to help reduce CPU load on things like loopwave.
Since it's always used now, the default has changed from 60 (Hz) to 0 (run as
fast as possible). Things like loopwave should still likely force this way
lower than the previous default (and already do: loopwave explicitly sets it
to 5).
The hint can now also be set to "waitevent" which will cause SDL_AppIterate
to only be called after new events have arrived, for apps that are entirely
driven by input and want to consume (almost) no power or CPU time until then.
Fixes #11093.
Fixes #11387.
src/tray/unix/SDL_tray.c: In function 'get_tmp_filename':
src/tray/unix/SDL_tray.c:345: warning: format '%ld' expects type 'long int', but argument 2 has type 'size_t'
src/tray/unix/SDL_tray.c: In function 'get_appindicator_id':
src/tray/unix/SDL_tray.c:361: warning: format '%ld' expects type 'long int', but argument 3 has type 'unsigned int'
Even if a borderless window doesn't have resizable borders set, the WS_MAXIMIZEBOX property needs to be set on the window, or maximizing it will make it fullscreen and cover the taskbar, instead of only filling the usable desktop space, as is usually expected from a maximized window. This style property needs to be retained until the window is no longer maximized, even if the resize flag is toggled off, or restoring from minimized can fail.