Commit Graph
19653 Commits
Author SHA1 Message Date
Frank Praznik 402fc52af4 x11: Fix boolean/enum comparison
This could set the pending flag even if there was no state change requested, which would cause errant sync timeouts in certain situations.

(cherry picked from commit 6a3b0413dc)
2026-05-27 12:16:48 -04:00
Anonymous Maarten ac75a4f020 _uitoa does not exist
(cherry picked from commit 08e338f45c)
(cherry picked from commit 452348acf8)
2026-05-27 00:35:28 +03:00
Sam Lantinga 10a82990ee You can't combine SDL_STRINGIFY_ARG() and SDL_FUNCTION
Removed obsolete documentation that shows this usage and macros that attempt it.

Also allow SDL_FUNCTION to be redefined by the application.

Fixes https://github.com/libsdl-org/SDL/issues/15004

(cherry picked from commit 6feb0e1333)
(cherry picked from commit cbd2917324)
(cherry picked from commit f689caed82)
2026-05-17 21:45:02 +03:00
Ozkan Sezer 7d4c119d17 SDL_opengl_glext.h, src/video/directx/d3d12.h: revert unintended changes from commit d70578b9aa
(cherry picked from commit 75c94e9b31)
2026-05-17 16:30:20 +03:00
Frank Praznik d2999a4047 wayland: Queue the surface frame callback after the initial commit
Some compositors may dispatch this too early, during the initial empty commit, when subsurfaces are attached to a toplevel window, but a buffer has yet to be committed to the parent surface. Don't set the frame callback until the initial empty commit is done, so it will be called when the actual parent surface frame is committed.

(cherry picked from commit e3393e6304)
2026-05-06 12:29:45 -04:00
Frank Praznik b42dbd8ecb wayland: Unconditionally send an exposure event on window shown status
Some compositors send the frame callback as part of the initial configuration sequence, so the window may already be past the "waiting for frame" state. Ensure that the exposure event is always sent.

(cherry picked from commit 1ac0ae9224)
2026-05-05 18:33:36 -04:00
Frank Praznik b35ffa1f69 wayland: Pass the inverted flag for horizontal scroll events
Natural scrolling affects both axes, and the compositor may not send the vertical axis orientation if the frame has no vertical scroll motion, so purely horizontal events need to be flagged as inverted as well.

(cherry picked from commit 3ee0439ae5)
2026-05-03 17:48:50 -04:00
Anonymous Maarten ab01c9f92a ci: clang-tools-extra is no longer available for mingw32
mingw32 and mingw64 are in the process of being deprecated

(cherry picked from commit be6f1efa26)
2026-04-28 18:29:28 +03:00
Anonymous Maarten c991501120 ci: add CFLAGS to pkg-config link command
(cherry picked from commit bc211aa150)
2026-04-28 18:15:00 +03:00
Ryan C. Gordon ec65d10e07 checkkeys: Sleeping for 100ms every frame makes the program too unresponsive.
Makes it feel like there's a bug in SDL's text input handling. 10ms is fine.

(cherry picked from commit 7212ab1c2a)
2026-04-28 08:09:27 -04:00
Frank Praznik c9b993f7b6 wayland: Prevent the window from errantly growing when scale to display is used
Some compositors will send a configure event immediately after a scale event, however, this event can contain the old logical size, and should be ignored, or the window will incorrectly change size when moved between displays with differing scale factors.

Store the last requested logical size as the last configure size when resizing a floating window due to a scale change, so a configure event immediately following with the old size will be ignored.

(cherry picked from commit 18219d5b53)
(cherry picked from commit 58c9c0ba7b)
2026-03-12 10:25:04 -04:00
Anonymous Maarten 17c70ee0aa cmake: cannot detect deprecated apple-clang link options (they are not fatal)
So skip these

(cherry picked from commit 5f151f4532)
2026-02-03 20:57:47 +01:00
Brad Smith 6d7bceb41d cmake: Fix header detection with CheckUSBHID
Make use of check_include_files to be able to also include
stdint.h when checking for the headers. Fixes detection of
usbhid.h on OpenBSD.

/usr/include/usbhid.h:40:2: error: unknown type name 'uint32_t'
   40 |         uint32_t _usage_page;
      |         ^

(cherry picked from commit 410a35fbee)
2026-01-28 07:45:40 -08:00
Frank Praznik 49955b3732 events: Raise keyboard keys before sending the focus lost message
Otherwise, the key raises may end up being ignored.

(cherry picked from commit e62d6a95b9)
2026-01-15 15:03:30 -05:00
Anonymous Maarten 3d03699d2b cmake: rpi videocore needs brcmegl as well
(cherry picked from commit cd31381185)
2026-01-14 18:17:52 +01:00
Frank Praznik c12b2e41cb joystick/win32: Fix function return type mismatch
Fixes #14804

(cherry picked from commit 55acc0b829)
2026-01-11 10:57:58 -05:00
Anonymous Maarten bba304c0b4 cmake: add SDL_FULL_VERSION target property containing full SDL version
(cherry picked from commit d73e74f9bf)
2026-01-06 04:05:20 +01:00
Sam Lantinga 814deb9438 Updated to version 3.2.31 for development 2025-12-31 17:54:27 -08:00
Sam Lantinga f5e5f65889 Ignore the tray template when checking for the SDL revision release-3.2.30 2025-12-31 17:10:09 -08:00
Sam Lantinga 65da64b0eb Print the SDL- strings that were found if validation failed 2025-12-31 17:00:35 -08:00
Sam Lantinga 3588d09b1c Updated to version 3.2.30 for release 2025-12-31 16:33:51 -08:00
Sam Lantinga 5afbd85755 gpu renderer: fixed memory leak when resizing the backbuffer
Fixes https://github.com/libsdl-org/SDL/issues/14734

(cherry picked from commit 9698e20399)
2025-12-31 08:02:35 -08:00
Frank Praznik 6034cf5cd8 gpu: Use the window event watcher list for Vulkan and D3D12
Events won't be delivered to the regular event watcher list callbacks if a client event filter discards events. Use the special window event watcher list to watch for resizes in the GPU renderers, as events are delivered to this list before a client can potentially discard them.

(cherry picked from commit cb4f33b644)
2025-12-31 07:52:03 -08:00
Ryan C. Gordon cfc41248be timer: Use the emscripten-specific code on Emscripten, even with threading.
Fixes #14640.

(cherry picked from commit 4d8f84f161)
2025-12-31 07:52:03 -08:00
Simon McVittie d1d0a50751 wayland: If GTK is disabled, try to avoid libdecor's GTK plugin
As described in the previous commit, loading GTK while setuid or setgid
would result in the process exiting. This is equally true if it's loaded
indirectly, for a libdecor plugin.

libdecor doesn't currently have any API by which it can be asked to
avoid specific plugins, but its GTK plugin declines to initialize if it
detects a non-main thread (because GTK documents that it must only be
used from the main thread), resulting in libdecor falling back to the
lower-priority Cairo plugin. We can make use of this by intentionally
initializing libdecor on another thread if we have been asked to avoid
GTK. This is a bit of a hack, but at worst it should be harmless.

Resolves: https://github.com/libsdl-org/sdl2-compat/issues/564
Signed-off-by: Simon McVittie <smcv@debian.org>
(cherry picked from commit 370e9407b5)
2025-12-30 17:13:51 -08:00