The data management devices that handle clipboard, drag & drop, and primary selection had functionality split across several source files. Consolidate all handling into the data manager source file, and expose only what is necessary.
Data device handling is untangled from multiple source files, duplicate functionality has been removed, trivial setters/getters have been removed, the internal API has shrunk and been simplified, and many functions have become static.
Keep the requested target in SelectionNotify when the clipboard
callback returns NULL. Mutter otherwise ignores the failure reply,
leaving Wayland clipboard readers waiting.
Fixeslibsdl-org/SDL#16567.
Wayland has no need for EGL when building SDL without any type of OpenGL support. Only consider it to be a requirement when OpenGL and/or OpenGL ES support is enabled.
This is not to be confused with the wayland-egl package, which is a helper library that is part of libwayland, and, despite the name, doesn't have a dependency on the actual EGL library either.
Showing the menu bar from windowDidResignKey while the app was being
deactivated made macOS hand focus back to it, so clicking another app's
window on a different display was undone a moment later. Restore it once
deactivation is done, only when another of our windows took key and is not
itself in a fullscreen Space.
GameInputIntiailize is an STDAPI function, which uses a __stdcall
convention. On 64 bit __stdcall is ignored but on 32 bit the
default calling convention is __cdecl. This results in the stack getting
corrupted and GameInputCreateWithVersion returns to a garbage address.
DualSense controllers come in as a collection of devices which the Android runtime stitches together and when the main controller arrives the sensors aren't available yet. This waits until device changes have settled for 50 ms before notifying SDL that a controller is available.
This also works around a potential deadlock condition in the Android runtime where sensors that are registered while device updates are happening can run into an internal ABBA deadlock.
It's possible for the thread to shutdown after running is set to false and before the looper wake happens. In that case the looper was no longer valid and Android would abort in the wake call.
The interface orientation may not be known when windows are created, so wait for it to be known before using it as the window orientation.
Fixes https://github.com/libsdl-org/SDL/issues/16436
SDL_SetWindowSurfaceVSync() will use the native backend framebuffer vsync functionality, if available. Otherwise, the request will be passed though to the window texture renderer, as the surface vsync function pointer is set to SDL_SetWindowTextureVSync() during window texture creation.
This implements SHM framebuffer support for Wayland. It is the most basic way of getting pixels onto the display, and should work even if no GPU driver or libraries are available. It uses no extensions in the interest of simplicity and compatibility.