mach: add borderless_window option

This commit is contained in:
Ali Chraghi 2022-12-28 21:45:36 +03:30 committed by Stephen Gutekanst
parent c26592ea89
commit b8deaf8010
2 changed files with 7 additions and 0 deletions

View file

@ -320,6 +320,10 @@ pub const Platform = struct {
platform.last_position = try platform.window.getPos(); platform.last_position = try platform.window.getPos();
if (options.borderless_window) {
try glfw.Window.setAttrib(platform.window, .decorated, false);
}
if (options.fullscreen) { if (options.fullscreen) {
var monitor: ?glfw.Monitor = null; var monitor: ?glfw.Monitor = null;

View file

@ -42,6 +42,9 @@ pub const Options = struct {
/// Headless mode. /// Headless mode.
headless: bool = false, headless: bool = false,
/// Borderless window
borderless_window: bool = false,
/// Monitor synchronization modes. /// Monitor synchronization modes.
vsync: enums.VSyncMode = .double, vsync: enums.VSyncMode = .double,