mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-15 09:18:27 +00:00
cocoa: Add a hint to control menu visibility in fullscreen spaces windows
Adds SDL_HINT_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY to control whether or not the menu can be accessed when the cursor is moved to the top of the screen when a window is in fullscreen spaces mode. The three values are true, false, and 'auto' (default), with auto resulting in a hidden menu if fullscreen was toggled programmatically, and the menu being accessible if fullscreen was toggled via the button on the window title bar, so the user has an easy way back out of fullscreen if the client app/game doesn't have a readily available option to toggle it.
This commit is contained in:
parent
611f132fd0
commit
b4562c0243
4 changed files with 82 additions and 17 deletions
|
@ -3330,6 +3330,23 @@ extern "C" {
|
|||
*/
|
||||
#define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES "SDL_VIDEO_MAC_FULLSCREEN_SPACES"
|
||||
|
||||
/**
|
||||
* A variable that specifies the menu visibility when a window is fullscreen in Spaces on macOS.
|
||||
*
|
||||
* The variable can be set to the following values:
|
||||
*
|
||||
* - "0": The menu will be hidden when the window is in a fullscreen space, and not accessible by moving the mouse to the top of the screen.
|
||||
* - "1": The menu will be accessible when the window is in a fullscreen space.
|
||||
* - "auto": The menu will be hidden if fullscreen mode was toggled on programmatically via `SDL_SetWindowFullscreen()`,
|
||||
* and accessible if fullscreen was entered via the "fullscreen" button on the window
|
||||
* title bar. (default)
|
||||
*
|
||||
* This hint can be set anytime.
|
||||
*
|
||||
* \since This hint is available since SDL 3.1.9.
|
||||
*/
|
||||
#define SDL_HINT_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY "SDL_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY"
|
||||
|
||||
/**
|
||||
* A variable controlling whether fullscreen windows are minimized when they
|
||||
* lose focus.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue