This prevents them from being interpreted as keyboard keys by the Java code, and if internally we are treating them as keyboard keys, they'll be repeated properly.
Fixes https://github.com/libsdl-org/SDL/issues/15664
(cherry picked from commit 3545bad589)
XInput2 can send slave button presses before FocusIn events, which can confuse the click-through suppression logic. A window must have keyboard focus to grab the mouse anyway, so ignore slave presses when lacking keyboard focus.
(cherry picked from commit ef9a5b7040)
XInput2 may send mouse buttons presses on both the master and slave devices, and the click-through button event should be ignored on both if required.
(cherry picked from commit 8371c09aa7)
7e994d8671 - authored by
Izumi Tsutsui:
netbsd: check not only addr 0 but also addr 1 to find root hubs
On NetBSD xhci(4) uses 'addr 0' for the root hub but all drivers for
other host controllers use 'addr 1' for the root hub.
https://gnats.netbsd.org/60073
(cherry picked from commit 169480a352)
It turns out this change causes a deadlock:
The main UI thread calls synchronized handleMotionEvent() which then calls SDL_LockJoysticks()
The main app thread calls SDL_LockJoysticks() and then synchronized pollInputDevices()
(cherry picked from commit 8c89a076a7)
This reverts commit c362f1341f.
It turns out this change causes a deadlock:
The main UI thread calls synchronized handleMotionEvent() which then calls SDL_LockJoysticks()
The main app thread calls SDL_LockJoysticks() and then synchronized pollInputDevices()
(cherry picked from commit 02975994c1)
This simply toggles a flag that rejects DnD offers if false. Events were previously dropped silently, but rejecting the offer makes some desktops display a proper icon when the drop will not work.
(cherry picked from commit 336d07c2b7)
Safari's older Gamepad API exposes `vibrationActuator` with `playEffect`
and `reset` but no `effects` enumeration array. The probe added in
651136ac7 dereferences `vibrationActuator['effects']['includes']`
unconditionally, throwing `TypeError: undefined is not an object` on
every Safari client that opens a connected gamepad. Add the missing
`['effects']` null check so the probe returns false on Safari instead
of aborting.
(cherry picked from commit db7ac820f9)
start/end should be FriBidiStrIndex here -- using FriBidiLevel makes
them `signed char` and the loop here will become infinite if `end` is
> 127.
(cherry picked from commit 0ffb0bdd87)
This fixes a UBSAN warning later in this function where it calculates
(1 << SDL_BITSPERPIXEL(surface->format)). The bpp might be >= 32 and
out of range for a bit shift.
(cherry picked from commit d5af35e3fb)
libusb-1.0-0 is needed to enable SDL_HIDAPI_LIBUSB. It does not work with the `libusb-dev` package on Ubuntu, which is for the older version.
(cherry picked from commit c247f06f01)