fix (darwin/v3) can't minimise in frameless (#5016)

* fix v3 can't minimise in frameless

* update UNRELEASED_CHANGELOG
This commit is contained in:
StupidBear 2026-02-26 18:10:42 +08:00 committed by GitHub
commit 6ad671f34d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -23,6 +23,7 @@ After processing, the content will be moved to the main changelog and this file
## Fixed
<!-- Bug fixes -->
- Fix frameless window cannot be minimized on darwin (#4294)
## Deprecated
<!-- Soon-to-be removed features -->

View file

@ -27,7 +27,7 @@ extern void registerListener(unsigned int event);
void* windowNew(unsigned int id, int width, int height, bool fraudulentWebsiteWarningEnabled, bool frameless, bool enableDragAndDrop, struct WebviewPreferences preferences) {
NSWindowStyleMask styleMask = NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | NSWindowStyleMaskMiniaturizable | NSWindowStyleMaskResizable;
if (frameless) {
styleMask = NSWindowStyleMaskBorderless | NSWindowStyleMaskResizable;
styleMask = NSWindowStyleMaskBorderless | NSWindowStyleMaskResizable | NSWindowStyleMaskMiniaturizable;
}
WebviewWindow* window = [[WebviewWindow alloc] initWithContentRect:NSMakeRect(0, 0, width-1, height-1)
styleMask:styleMask