This seems to help some devices that can't keep up with smaller fragment sizes
for whatever reason.
Fixes#13110.
(cherry picked from commit 14a4ae521a)
This makes sure we get reliable mouse enter/exit events from the system on
older macOS releases.
Newer releases don't have this problem--my assumption is that Cocoa has a
more aggressive default tracking area installed for some newer UI feature.
For 3.2.16, we'll use the explicit tracking area on older macOSes only, but
I'll remove that check in revision control for newer OSes and see what
happens.
Fixes#12725.
(cherry picked from commit f61d956a04)
Added an opening bracket in line 520, in the comment block of SDL_PixelFormat. Simple addition to the readability of documentation.
(cherry picked from commit 03a6d98aee)
Windows can get in a state when it stops reporting raw input events for game controllers until reboot.
The downside of this change is that we lose support for trigger rumble and are limited to 4 controllers again, but if that's important for your application you can use SDL_SetHint(SDL_HINT_JOYSTICK_RAWINPUT, true) to enable this functionality.
Fixes https://github.com/libsdl-org/SDL/issues/13047
(cherry picked from commit aa870d511e)
Using processed timestamps can result in anomalies that cause excessive repeat events, and hard caps can cause issues.
In the key event handler, use the raw elapsed time to calculate any remaining repeat events to avoid the artifacts that can result from using processed timestamps.
The Wayland key repeat rate ranges from 0 to 1000 per second, so millisecond resolution doesn't lose any precision.
(cherry picked from commit e3d44cdd51)
Not all window managers send a MapNotify or PropertyNotify event when the window is shown, so assume that it was mapped and set the flag accordingly.
(cherry picked from commit b70919ecd9)
More non-compositing window managers than just openbox seem to need this, so always force sending the window position and dimensions when entering/leaving fullscreen. If they are wrong, they will be immediately overwritten by the correct dimensions from a subsequent ConfigureNotify event.
This is disabled on XWayland, as it seems to cause hitching on some compositors.
(cherry picked from commit 0657ece55d)
Cap the elapsed time to something sane in case the compositor sends a bad timestamp, which can result it in it looking like the key has been pressed for a *very* long time, bringing everything to a halt while it tries to enqueue all the repeat events.
(cherry picked from commit 05f779f61e)
The text input cursor should reflect the cursor position, not the entire text input rect. Set it correctly so that IME chooser dialogs appear in the correct location.
(cherry-picked from commit c7549eb0b6)
SDL_PrivateJoystickAdded was called before setting the InstanceId in the adapters ctx->joysticks array. This would eventually broadcast the SDL_EVENT_JOYSTICK_ADDED event with the new InstanceId, if your program listens for the added events and opens joysticks at that point it would always fail because there would be no matching InstanceId in the ctx->joysticks array.
(cherry picked from commit afd1e51023)
The main view always reflects the size of the output, so don't use the dimensions of the currently bound render target texture when updating it, or it will reflect an incorrect size when the render target texture is unbound.
(cherry picked from commit 8aa5b97bb5)
This prevents problems if one starts a line, which would cause it to be
interpreted as a command character.
Fixes#13038.
(cherry picked from commit 1f7aa16eae)