Skip to content

Commit

Permalink
Allow quicklook to appear above extra pane
Browse files Browse the repository at this point in the history
Closes #27

We want quicklook windows to appear above the pane.
We also want iTerm hotkey window to appear below the pane.
Tried `.modalPanel` and that doesn't work (iTerm appears on top)
`.mainMenu` seems to work.
https://jameshfisher.com/2020/08/03/what-is-the-order-of-nswindow-levels/

So now, the `NSWindow.Level` for extra pane is `.mainMenu` 🤷🏻‍♂️
  • Loading branch information
mr-pennyworth committed Oct 21, 2024
1 parent 94e83bc commit c25ee84
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions AlfredExtraPane.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 0.2.11;
MARKETING_VERSION = 0.2.12;
ONLY_ACTIVE_ARCH = NO;
OTHER_CODE_SIGN_FLAGS = "--deep";
PRODUCT_BUNDLE_IDENTIFIER = mr.pennyworth.AlfredExtraPane;
Expand All @@ -438,7 +438,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 0.2.11;
MARKETING_VERSION = 0.2.12;
ONLY_ACTIVE_ARCH = NO;
OTHER_CODE_SIGN_FLAGS = "--deep";
PRODUCT_BUNDLE_IDENTIFIER = mr.pennyworth.AlfredExtraPane;
Expand Down
7 changes: 6 additions & 1 deletion AlfredExtraPane/Pane.swift
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,12 @@ func makeWindow() -> NSWindow {
screen: NSScreen.main!
)
window.backgroundColor = .clear
window.level = .screenSaver
// We want quicklook windows to appear above the pane.
// We also want iTerm hotkey window to appear below the pane.
// Tried .modalPanel and that doesn't work (iTerm appears on top)
// .mainMenu seems to work
// https://jameshfisher.com/2020/08/03/what-is-the-order-of-nswindow-levels/
window.level = .mainMenu
window.collectionBehavior = [
.moveToActiveSpace, .stationary, .fullScreenAuxiliary
]
Expand Down

0 comments on commit c25ee84

Please sign in to comment.