From 18ee469c472e584ddc5ce295e31b0600f9710579 Mon Sep 17 00:00:00 2001 From: ALMAS <9382335+almas1992@users.noreply.github.com> Date: Sat, 30 Sep 2023 05:59:50 -0500 Subject: [PATCH] [v2/Mac] Change Window Level (#2944) * Change Window Level in Mac --- v2/internal/frontend/desktop/darwin/AppDelegate.m | 2 +- v2/internal/frontend/desktop/darwin/WailsContext.m | 2 +- website/src/pages/changelog.mdx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/v2/internal/frontend/desktop/darwin/AppDelegate.m b/v2/internal/frontend/desktop/darwin/AppDelegate.m index 6d46deae..b66979e7 100644 --- a/v2/internal/frontend/desktop/darwin/AppDelegate.m +++ b/v2/internal/frontend/desktop/darwin/AppDelegate.m @@ -17,7 +17,7 @@ - (void)applicationWillFinishLaunching:(NSNotification *)aNotification { [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular]; if (self.alwaysOnTop) { - [self.mainWindow setLevel:NSStatusWindowLevel]; + [self.mainWindow setLevel:NSFloatingWindowLevel]; } if ( !self.startHidden ) { [self.mainWindow makeKeyAndOrderFront:self]; diff --git a/v2/internal/frontend/desktop/darwin/WailsContext.m b/v2/internal/frontend/desktop/darwin/WailsContext.m index 379b2fe9..1c84a576 100644 --- a/v2/internal/frontend/desktop/darwin/WailsContext.m +++ b/v2/internal/frontend/desktop/darwin/WailsContext.m @@ -406,7 +406,7 @@ typedef void (^schemeTaskCaller)(id); - (void) SetAlwaysOnTop:(int)onTop { if (onTop) { - [self.mainWindow setLevel:NSStatusWindowLevel]; + [self.mainWindow setLevel:NSFloatingWindowLevel]; } else { [self.mainWindow setLevel:NSNormalWindowLevel]; } diff --git a/website/src/pages/changelog.mdx b/website/src/pages/changelog.mdx index 609ee7a3..d49cf6d3 100644 --- a/website/src/pages/changelog.mdx +++ b/website/src/pages/changelog.mdx @@ -25,7 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - AssetServer requests are now processed asynchronously without blocking the main thread on Windows. Changed by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2926) - AssetServer requests are now processed concurrently by spawning a goroutine per request. Changed by @stffabi in [PR](https://github.com/wailsapp/wails/pull/2926) - Now building with `-devtools` flag doesn't enable the default context-menu. Changed by @mmghv in [PR](https://github.com/wailsapp/wails/pull/2923) - +- Change Window Level. Changed by @almas1992 in [PR](https://github.com/wailsapp/wails/pull/2944) #### Fixed - Fixed typo on docs/reference/options page. Added by [@pylotlight](https://github.com/pylotlight) in [PR](https://github.com/wailsapp/wails/pull/2887)