Previously this was only available through the gamepad API, but this state has
always actually lived on the lower-level joystick objects, so there's no sense
in not offering a public API for that level, as well.
Closes#16202.
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.
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.
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.
Don't presume that the window requires fixed size handling until a configure event sets the state. Fixes setting an initial size on a hidden window (regression from fcb5ef8a9c).
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>