From 9b287b660437090a789cb3ab9f6e92621f00e203 Mon Sep 17 00:00:00 2001 From: "Mr. Pennyworth" Date: Sat, 27 Jul 2024 18:28:13 -0500 Subject: [PATCH] Fix where and how pane appears The pane always appeared on the main space, now it appears on the same space as Alfred. The pane appeared on top of other windows, but not on top of `iTerm2`'s visor window. That's because `iTerm2` uses the `screenSaver` window level. Now we start using it too. Thus making the pane no longer appear behind the iterm window. --- AlfredExtraPane.xcodeproj/project.pbxproj | 4 ++-- AlfredExtraPane/Pane.swift | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/AlfredExtraPane.xcodeproj/project.pbxproj b/AlfredExtraPane.xcodeproj/project.pbxproj index ec2317d..7bd6bc0 100644 --- a/AlfredExtraPane.xcodeproj/project.pbxproj +++ b/AlfredExtraPane.xcodeproj/project.pbxproj @@ -413,7 +413,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 11.0; - MARKETING_VERSION = 0.2.2; + MARKETING_VERSION = 0.2.3; ONLY_ACTIVE_ARCH = NO; OTHER_CODE_SIGN_FLAGS = "--deep"; PRODUCT_BUNDLE_IDENTIFIER = mr.pennyworth.AlfredExtraPane; @@ -434,7 +434,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 11.0; - MARKETING_VERSION = 0.2.2; + MARKETING_VERSION = 0.2.3; ONLY_ACTIVE_ARCH = NO; OTHER_CODE_SIGN_FLAGS = "--deep"; PRODUCT_BUNDLE_IDENTIFIER = mr.pennyworth.AlfredExtraPane; diff --git a/AlfredExtraPane/Pane.swift b/AlfredExtraPane/Pane.swift index f9de364..722a29a 100644 --- a/AlfredExtraPane/Pane.swift +++ b/AlfredExtraPane/Pane.swift @@ -146,9 +146,9 @@ func makeWindow() -> NSWindow { screen: NSScreen.main! ) window.backgroundColor = .clear - window.level = .floating + window.level = .screenSaver window.collectionBehavior = [ - .canJoinAllSpaces, .stationary, .fullScreenAuxiliary + .moveToActiveSpace, .stationary, .fullScreenAuxiliary ] // weird: without the following line