These callbacks run in a thread we don't control, but might call SDL_SetError,
which will claim a TLS slot that never gets otherwise deallocated. To prevent
the leak, finish each callback by explicitly freeing any thread-local data.
Fixes#12732.
It doesn't work well with Vulkan, and Vulkan windows may not have the Vulkan flag set in all circumstances, so only enable it if we explicitly know that OpenGL is being requested instead.
Moved the event handlers from SDL_CreateWindow to SDL_VideoInit
emscripten_set_mouseup_callback
emscripten_set_focus_callback
emscripten_set_blur_callback
emscripten_set_pointerlockchange_callback
emscripten_set_fullscreenchange_callback
emscripten_set_resize_callback
We may want to extend this with additional properties in the future.
Also removed SDL_PROP_GPU_DEVICE_DEBUG_VULKAN_CONFORMANCE_STRING. If we need feature level queries we can add them in the future.
On non-compositing window managers, XIconifyWindow can trigger map/unmap events, which would toggle the window hidden/shown state. This should not be done, as a hidden window in SDL is equivalent to a withdrawn window in X, and SDL will try to set/reset state when it is shown again.
Unless the window is explicitly being withdrawn via X11_HideWindow(), set unmapped windows to the minimized/occluded state, and send a restored event when mapped again.
This hint needs to persist outside of the normal application flow, so use the environment to set the initial value, and then save the value set via SDL_SetHint() after that.
Fixes https://github.com/libsdl-org/SDL/issues/12677
This fixes the feature detection in cases where linking the final executable would fail.
This is fine since SDL only opens these libraries using dlopen as well.
The taskbar list is invalid after OleUninitialize(), so make sure we clean it up first.
Also don't bother creating the taskbar list if we don't have any progress state