The xpad kernel driver doesn't know about these controllers and ends up using BTN_C and BTN_Z and the automatic mapping doesn't work correctly.
It turns out VID 0x045e and PID 0x02e0 is used by the 8BitDo SN30 Pro when connecting via Bluetooth in XInput mode.
Fixes https://github.com/libsdl-org/SDL/issues/7925
Currently, SDL_CLIPBOARDUPDATE events are only sent when an SDL window
has its selection cleared. This change sends the event anytime the
XFixesSelectionNotify event is raised, and when the selection is either
the clipboard or the primary selection.
Initializing "Windows.Gaming.Input.Gamepad" will put Bluetooth PS4 controllers into enhanced report mode, which breaks any game using DirectInput. Let's wait to do this until absolutely necessary.
The xdg_activation token requires specifying the surface that is the source of the activation request, not the surface of the target window. Setting this to the target window was causing raise requests to be blocked by the compositor, as if the surface noted as the origin of the request didn't currently have focus, it appeared to the compositor as though it was trying to 'steal' focus.
Detecting by name such as "Accelerometer and "Motion Sensor" may be too broad.
Sensors on Dualshock and Switch gamepad are correctly detected by SDL_EVDEV_GuessDeviceClass().
Use vendor and product ID for Wii extension controls.
Keyboard focus was being passed to the child window being shown if SDL_HINT_WINDOW_ACTIVATE_WHEN_SHOWN is false and keyboard focus was not being passed to the child window being activated in WIN_RaiseWindow.
- Windows created minimized are shown with SW_SHOWMINNOACTIVE which does not send WM_SHOWWINDOW leaving the window visible (but minimized)
on desktop but still with the SDL_WINDOW_HIDDEN flag set. Now the hidden flag is cleared in this case but noted that this means it's not currently possible
to create a window that is initially hidden that then is minimized once shown.
video(wayland): use both --icon and --icon-name for Zenity
Many distros ship an older version of Zenity that supports GTK3, while some distros ship newer version of Zenity which uses libadwaita.
This command tries to use --icon and fall back to --icon-name when it fails.
Use the implicit grab serial, which includes keyboard key, mouse button, touch, and tablet tool events, for setting the clipboard and primary selection data, as these are all considered valid originating event serials.
We don't necessarily know the size of the output characters, so do a full 32-bit zero termination on the output string.
This fixes garbage at the end of Windows clipboard text
This will simplify the X11 and Wayland implementations, which were doing that under the hood, and makes application interaction between the two APIs consistent.