cursor-shape-v1 version 2 adds dnd_ask and all_resize, but SDL_SystemCursor does not expose matching cursor types yet. Bind the protocol at version 2 now so SDL negotiates the updated interface correctly while keeping the current cursor mapping unchanged.
Some platforms require drawing something to the window for it to be mapped, so create a renderer and redraw on exposure events.
Additionally, add the license to the testtray.c file and clang-format the source.
The various SDL_Tray*DBus structs are supposed to be backend-specific
subclasses of the corresponding SDL_Tray* structs. This is done by making
the first member be a 'parent' of that type, so that, e.g., SDL_TrayDriverDBus
can be cast into an SDL_TrayDriver. However, these '_parent' members were
mistakenly removed in commit ce90105cf8 ("Clean up the tray D-Bus code"), as
they're never directly referenced.
Reinstate these variables, and instead of casting SDL_Tray*DBus to SDL_Tray* on
creation, reference the _parent member directly, so that any tooling will know
the variable is indeed used. In addition, rename _parent to class_parent, to
make its purpose more obvious.
Fixes: ce90105cf8 ("Clean up the tray D-Bus code")
This PR maps buttons 7 and 8 to paddles 2 (left) and 1 (right) respectively, and it also duplicates the mapping but for crc 0x2004, since the CRC of this controller changes if it was hotplugged.
When a window has the pointer grabbed, the X server will grab all master device events, and XInput2 will continue to deliver slave events to the window immediately under the pointer, regardless of grab status. Only send slave pointer events to the focused window, and fall back to the core X events to catch button presses missed when the pointer is over another window.
Previously we weren't doing drawing, but we were enqueuing viewport commands and so forth, which were causing GPU permission errors on iOS. We really don't want to be sending any work to the GPU when we're in the background.
On Android, backgrounding and foregrounding an app causes the Vulkan
surface to be destroyed. vkAcquireNextImageKHR returns
VK_ERROR_SURFACE_LOST_KHR, but the acquire while(true) loop only calls
RecreateSwapchain which doesn't recreate the surface, resulting in an
infinite retry loop and a black screen.
Handle VK_ERROR_SURFACE_LOST_KHR by setting both needsSurfaceRecreate
and needsSwapchainRecreate, then returning to let the existing
recreation path handle it on the next call.
Fixes#15322
This works inside of containers, and supports passing an activation token with the request, which is needed on Wayland to transfer focus to the browser.
(Strictly speaking, this was probably meant to be an "append" to the home/base
directory before the org/app name are appended to _that_, but it's definitely
added to the absolute start of the string on Emscripten, so might as well make
all of these match.
Reference PR #15262.
CMAKE_COMPILER_IS_GNUCC is obsolete variable and can be replaced with
CMAKE_C_COMPILER_ID (also available since early CMake versions).
In the past CMake versions also LCC and QCC compilers had this varible
set to boolean true but these aren't relevant here.