- If a window being destroyed is a child of an inactive window and was the last keyboard focus of the window, that window will be left with a stale pointer
to the destroyed window that it will attempt to restore the next time that window is focused. SDL_DestroyWindow will have already taken care of moving
focus if this window is the current SDL keyboard focus so this change intentionally does not set focus.
- Like Cocoa_HideWindow, this attempts to move the focus to the closest parent window that is not hidden or destroying.
- We intentionally don't raise the application when raising a child window to allow raising a child window to the top without setting the application active but the
child window should still be set as key window for the application if desired.
Many SDL subsystems depend on being able to see time passing. If you are porting to a new platform, you'll need to fill in a timer implementation as part of the initial port.
Fixes https://github.com/libsdl-org/SDL/issues/8850
This updates GetAudioDevices() to have the same behavior as SDL_GetJoysticks() where the return value will only be NULL if there is an error. Returning no devices will return a valid array containing NULL.
Add the ability to import and wrap external surfaces from external toolkits such as Qt and GTK.
Wayland surfaces and windows are more intrinsically tied to the client library than other windowing systems, so it is necessary to provide a way to initialize SDL with an existing wl_display object, which needs to be set prior to video system initialization, or export the internal SDL wl_display object for use by external applications or toolkits. For this, the global property SDL_PROPERTY_GLOBAL_VIDEO_WAYLAND_WL_DISPLAY_POINTER is used.
A Wayland example was added to testnative, and a basic example of Qt 6 interoperation is provided in the Wayland readme to demonstrate the use of external windows with both SDL owning the wl_display, and an external toolkit owning it.
Windows doesn't inform applications if the window is in the docked/tiled state, so let windows manage the window size when restoring from a fixed-size state, unless the application explicitly requested a new size/position.
Fixes the video_getSetWindowState test.
WM_WINDOWPOSCHANGING needs to return 0 when a resize was initiated programmatically
Checking the SWP_NOMOVE and SWP_NOSIZE flags in the WINDOWPOS struct when handling WM_WINDOWPOSCHANGED to avoid sending redundant resize and move events is unreliable, as they can be set even when the window has moved or changed size, such as when leaving fullscreen, or programmatically resizing a window without STYLE_RESIZABLE set.
Fixes the video_getSetWindowSize and video_setWindowCenteredOnDisplay tests.