video: Add a hint to disable auto mode switching if an exclusive fullscreen window moves between displays
The existing behavior helps clients that don't expect exclusive fullscreen windows to move by maintaining a consistent size and mode, however, some are aware that this can occur and want to handle mode selection themselves. Add a hint to disable auto mode switching when an exclusive fullscreen window moves to accommodate this use case, and don't override fullscreen changes that may occur in an event watcher between the display changed event being posted and SDL running the display changed handler, as the mode switch may have already been handled there by the client.
This commit is contained in:
@@ -3405,6 +3405,25 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY "SDL_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY"
|
||||
|
||||
/**
|
||||
* A variable controlling whether SDL will attempt to automatically set the
|
||||
* destination display to a mode most closely matching that of the previous
|
||||
* display if an exclusive fullscreen window is moved onto it.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
*
|
||||
* - "0": SDL will not attempt to automatically set a matching mode on the destination display.
|
||||
* If an exclusive fullscreen window is moved to a new display, the window will become
|
||||
* fullscreen desktop.
|
||||
* - "1": SDL will attempt to automatically set a mode on the destination display that most closely
|
||||
* matches the mode of the display that the exclusive fullscreen window was previously on. (default)
|
||||
*
|
||||
* This hint can be set anytime.
|
||||
*
|
||||
* \since This hint is available since SDL 3.2.10.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_MATCH_EXCLUSIVE_MODE_ON_MOVE "SDL_VIDEO_MATCH_EXCLUSIVE_MODE_ON_MOVE"
|
||||
|
||||
/**
|
||||
* A variable controlling whether fullscreen windows are minimized when they
|
||||
* lose focus.
|
||||
|
||||
Reference in New Issue
Block a user