This lets the OS remove windows that were destroyed in cases where we aren't
terminating the process right after calling SDL_Quit(). Otherwise, they'll
stay on the screen, unresponsive.
Apparently there is some animation state that needs to complete, and that is
handled via the runloop.
Fixes#10081.
(cherry picked from commit 4f477c807c)
Skip hit testing when an implicit grab is active, or button raise events may be lost, and the cursor icon may be improperly set if the client reports hit test results while the pointer is outside the window bounds.
(cherry picked from commit bc0a43ec7f)
By putting the WM_TAKE_FOCUS atom in the WM_PROTOCOLS property, SDL
chooses either the "Locally Active" or "Globally Active" input model
depending on the input flag in WM_HINTS.
In order to assist the window manager with making the right decision,
for example, skip this window when choosing what window to activate
next, it will be better if the WM knows right away that the window
accepts or doesn't accept focus (in other words, have either both
the input flag set in WM_HINTS + WM_TAKE_FOCUS or none).
Since the WM_TAKE_FOCUS atom is placed in the WM_PROTOCOLS property, the
WM wanting to adhere to the spec has no choice but send a client message
asking to activate the window and hope for the better.
At quick glance, it appears that the WM_TAKE_FOCUS atom is leftover from
SDL_WINDOWEVENT_TAKE_FOCUS, which was dropped a while ago, and is not
used anymore. So this change removes the WM_TAKE_FOCUS atom to help
window managers such as kwin work better.
(cherry picked from commit 5e8eb0d4e7)
This allows user stick calibration to be applied on JoyCons and possibly
partially user calibrated Pro controllers.
(cherry picked from commit fb8a32cc75)
PPC_FEATURE_HAS_ALTIVEC is not defined by all C libraries. The following
error was raised while testing SDL3 in Buildroot with a PowerPC toolchain
using uClibc-ng:
src/cpuinfo/SDL_cpuinfo.c: In function 'SDL_GetAltiVecFeatures':
src/cpuinfo/SDL_cpuinfo.c:351:37: error: 'PPC_FEATURE_HAS_ALTIVEC' undeclared (first use in this function)
351 | altivec = getauxval(AT_HWCAP) & PPC_FEATURE_HAS_ALTIVEC;
| ^~~~~~~~~~~~~~~~~~~~~~~
Provide a fallback definition when it is not defined.
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
(cherry picked from commit e721af3baf)
keyEvent->charCode is deprecated in DOM Level 3 and marked deprecated
in Emscripten's html5.h. Use keyEvent->key instead.
(cherry picked from commit f0b84476f9)
This commit fixes a regression introduced by c44fa5bb
The evdev backend currently uses high_res_hwheel to select the
normalization denominator for both horizontal and vertical wheel
events.
This causes devices which advertise REL_WHEEL_HI_RES but not
REL_HWHEEL_HI_RES to report vertical wheel movement 120 times
larger than intended.
Use the corresponding high-resolution capability independently for
each axis, restoring the behavior before c44fa5bb.
(cherry picked from commit b640b804a8)
SDL_QueryGPUFence is documented to return true when the fence is signaled (complete). Since 514b26e it returns METAL_INTERNAL_IsFenceBusy directly, so it returns true when the fence is still busy, breaking usage of SDL_AcquireGPUSwapchainTexture.
(cherry picked from commit b340ddcd7b)
The capabilities parameter is a uint32_t in the function signature in the header, not an enum.
Fixes a clang-tidy warning.
(cherry picked from commit 2afc369e8a)