Note that we don't account for vertex color here. If HDR10 content needs to be tinted by vertex color, it can't use the simple shader. I'm assuming that the use case for this will be video content which generally won't use vertex color and this optimization is fine.
On some Wayland configurations, the SDR white level is 203 nits and the max luminance is 10000 nits, and HDR content in the PQ range is mapped by the compositor into the actual display capabilities. We don't want to show an HDR gradient up to 10000 nits, so let's cap it to ~1000 nits in this case.
If the previous selection offering was recursive, a nil selection should be ignored, or clearing the clipboard may clear the backing memory of the client's selection offering as well.
The warp event in Wayland can occur without explicitly warping the mouse, such as if a window changes position under the cursor while the cursor is stationary. Introduce the internal SDL_SendMouseWarp() function to handle updating the absolute cursor position without generating relative motion for these cases.
Explicit version checks require application manifests on Win10, or an older version will be reported. Check for the toast notification history interface, which is only available on Win10+, and use that to determine if the Windows version is high enough to support notifications.
The wl_fixes.ack_global_remove request signals the compositor that the
client will not bind the removed global. It can be used by the
compositor to decide when it is safe to actually destroy the
corresponding global. If a global is destroyed too soon, some clients may
get disconnected.
See also https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/533
Remove a superfluous null byte at the end of ps3_hid_report_descriptor,
as it might confuse some more stricter parser.
The data in ps3_hid_report_descriptor probably comes for a libinput
recording, and sometimes those can have superfluous null byte at the
end.
This is mentioned for example in the hidreport project:
64d4067403/tools/libinput-recording-extract-hid-descriptor.py (L25-L27)
As a proof that the original HID report descriptor of the actual device
is 148 bytes long, the following lsusb capture can be compared:
http://ps3.jim.sh/sixaxis/usb/lsusb.txt
Signed-off-by: Antonio Ospite <antonio.ospite@collabora.com>
Some window managers will mark minimized or offscreen windows as unmapped. When hiding a window, unconditionally call XWithdrawWindow, and don't wait for an UnmapNotify event if the window is already in the unmapped state, or it will block indefinitely waiting for an event that never arrives.
My old PR #15867 switched the fullscreen path to WindowInsetsController.hide() for API 30+, because the legacy setSystemUiVisibility() flags are ignored on API 30+.
The leaving fullscreen path was left untouched: it still calls setSystemUiVisibility(SYSTEM_UI_FLAG_VISIBLE), which is equally ignored on API 30+.
As a result, once fullscreen had hidden the status/navigation bars, they never came back when returning to windowed mode.
v2 removes v1's strict ordering requirement (decoration object must be created and configured before any buffer is attached), allowing xdg_toplevel_decoration to be created even after a buffer has already been attached/committed
The PS3 probing switches the HORI Horipad Mini into Nintendo Switch report mode, which we don't recognize since it's still using the Xbox 360 endpoint.
Generate activation tokens for new windows when necessary, and check the hint for activating windows when shown. This will allow new windows to correctly take focus in environments with elevated focus stealing prevention when possible, and it will try to prevent new windows from being activated if the hint is set to false.