diff --git a/v3/pkg/application/webview_window_darwin.go b/v3/pkg/application/webview_window_darwin.go index e1dee398b..8b243dadc 100644 --- a/v3/pkg/application/webview_window_darwin.go +++ b/v3/pkg/application/webview_window_darwin.go @@ -1425,10 +1425,13 @@ func (w *macosWebviewWindow) run() { case MacBackdropNormal: } - if macOptions.WindowLevel == "" { - macOptions.WindowLevel = MacWindowLevelNormal + // Only set window level if explicitly specified, or if not a floating panel + // (setFloatingPanel:YES already sets NSFloatingWindowLevel, so don't override it) + if macOptions.WindowLevel != "" { + w.setWindowLevel(macOptions.WindowLevel) + } else if !(macOptions.WindowClass == NSPanel && macOptions.PanelOptions.FloatingPanel) { + w.setWindowLevel(MacWindowLevelNormal) } - w.setWindowLevel(macOptions.WindowLevel) // Set collection behavior (defaults to FullScreenPrimary for backwards compatibility) w.setCollectionBehavior(macOptions.CollectionBehavior) diff --git a/v3/pkg/application/webview_window_darwin.m b/v3/pkg/application/webview_window_darwin.m index bf3a0c74f..83ed6170c 100644 --- a/v3/pkg/application/webview_window_darwin.m +++ b/v3/pkg/application/webview_window_darwin.m @@ -32,10 +32,7 @@ typedef NS_ENUM(NSInteger, MacLiquidGlassStyle) { // This ensures KeyBindings work regardless of first responder state - (void)sendEvent:(NSEvent *)event { if (event.type == NSEventTypeKeyDown) { - // Process through keybinding system first [self keyDown:event]; - // Still pass to WKWebView for normal input handling - // (keybinding callbacks like Hide will take effect regardless) } [super sendEvent:event]; } @@ -269,10 +266,7 @@ typedef NS_ENUM(NSInteger, MacLiquidGlassStyle) { // This ensures KeyBindings work regardless of first responder state - (void)sendEvent:(NSEvent *)event { if (event.type == NSEventTypeKeyDown) { - // Process through keybinding system first [self keyDown:event]; - // Still pass to WKWebView for normal input handling - // (keybinding callbacks like Hide will take effect regardless) } [super sendEvent:event]; } diff --git a/website/src/pages/changelog.mdx b/website/src/pages/changelog.mdx index 7ee827ba5..d65c85432 100644 --- a/website/src/pages/changelog.mdx +++ b/website/src/pages/changelog.mdx @@ -15,7 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added -- Added NSPanel support for macOS. Panels serve as auxillary windows and can appear over fullscreen apps without activating the application using `NSWindowStyleMaskNonactivatingPanel`. Configure via `Mac.WindowClass` and `Mac.PanelOptions` in window options. Added by [@Grantmartin2002](https://github.com/Grantmartin2002) in [PR](https://github.com/wailsapp/wails/pull/5024) +- Added NSPanel support for macOS. Panels serve as auxiliary windows and can appear over fullscreen apps without activating the application using `NSWindowStyleMaskNonactivatingPanel`. Configure via `Mac.WindowClass` and `Mac.PanelOptions` in window options. Added by [@Grantmartin2002](https://github.com/Grantmartin2002) in [PR](https://github.com/wailsapp/wails/pull/5024) ### Fixed - Fixed locking issue on Windows when multiselect dialog returns an error. Fixed in [PR](https://github.com/wailsapp/wails/pull/4156) by @johannes-luebke