core: add borderless window fullscreen support

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2023-01-28 12:03:03 -07:00
parent cf1e870688
commit f57073f02f
3 changed files with 67 additions and 18 deletions

View file

@ -373,9 +373,21 @@ pub const KeyMods = packed struct {
};
pub const DisplayMode = enum {
/// Windowed mode.
windowed,
/// Fullscreen mode, using this option may change the display's video mode.
fullscreen,
// TODO: fullscreen_windowed,
/// Borderless fullscreen window.
///
/// Beware that true .fullscreen is also a hint to the OS that is used in various contexts, e.g.
///
/// * macOS: Moving to a virtual space dedicated to fullscreen windows as the user expects
/// * macOS: .borderless windows cannot prevent the system menu bar from being displayed
///
/// Always allow users to choose their preferred display mode.
borderless,
};
pub const CursorMode = enum {