From 296b9debd3a8a60eee9c23b8248e73bd89cba63e Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Sat, 7 Dec 2024 21:14:38 +1100 Subject: [PATCH] Support fullscreen for frameless windows. --- mkdocs-website/docs/en/changelog.md | 1 + v3/pkg/application/webview_window_darwin.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/mkdocs-website/docs/en/changelog.md b/mkdocs-website/docs/en/changelog.md index d6a1f9366..1e407662c 100644 --- a/mkdocs-website/docs/en/changelog.md +++ b/mkdocs-website/docs/en/changelog.md @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [darwin] Ensure `windowDidBecomeKey` callback is running on main thread by [@leaanthony](https://github.com/leaanthony) - Ensure key callbacks in window run() are called on the main thread by [@leaanthony](https://github.com/leaanthony) +- [darwin] Support fullscreen for frameless windows by [@leaanthony](https://github.com/leaanthony) ## v3.0.0-alpha.8.3 - 2024-12-07 diff --git a/v3/pkg/application/webview_window_darwin.go b/v3/pkg/application/webview_window_darwin.go index 33a769e59..5e9386949 100644 --- a/v3/pkg/application/webview_window_darwin.go +++ b/v3/pkg/application/webview_window_darwin.go @@ -33,6 +33,9 @@ void* windowNew(unsigned int id, int width, int height, bool fraudulentWebsiteWa backing:NSBackingStoreBuffered defer:NO]; + // Allow fullscreen. Needed for frameless windows + window.collectionBehavior = NSWindowCollectionBehaviorFullScreenPrimary; + // Create delegate WebviewWindowDelegate* delegate = [[WebviewWindowDelegate alloc] init]; [delegate autorelease];