If the first mapping we see doesn't have a CRC, continue looking for another exact CRC match.
Fixes testautomation --filter TestVirtualJoystick
(cherry picked from commit 5826966873)
XMonad ignores size hints and shrinks the client area to overlay borders on fixed-size windows, even if no borders were requested, resulting in the window client area being smaller than requested. Calling XResizeWindow after mapping seems to fix it, even though resizing fixed-size windows in this manner doesn't work on any other window manager.
(cherry picked from commit 45eb6310a8)
Windows seems to implicitly enable IME text input on windows created while an IME is active, which causes the IME suggestion window to pop up when keys are pressed, even if a client never explicitly enabled it. Ensure that IME support is initially disabled on new windows; SDL will enable it at a later time, if required.
(cherry picked from commit 22fa45b3c1)
Just in case this ever get deinitialized sooner, we'd still like to SDL_free()
things on shutdown, etc.
Reference PR #13148.
(cherry picked from commit 9e0d9f30a7)
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)