Skip to content

Commit b3cb44b

Browse files
committed
Force other UI elements to be above the chat panel
1 parent 5afd7b4 commit b3cb44b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Core/Sources/SuggestionWidget/SuggestionWidgetController.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public final class SuggestionWidgetController: NSObject {
3131
it.isReleasedWhenClosed = false
3232
it.isOpaque = false
3333
it.backgroundColor = .clear
34-
it.level = .floating
34+
it.level = .init(NSWindow.Level.floating.rawValue + 1)
3535
it.hasShadow = true
3636
it.contentView = NSHostingView(
3737
rootView: WidgetView(
@@ -61,7 +61,7 @@ public final class SuggestionWidgetController: NSObject {
6161
it.isReleasedWhenClosed = false
6262
it.isOpaque = false
6363
it.backgroundColor = .clear
64-
it.level = .floating
64+
it.level = .init(NSWindow.Level.floating.rawValue + 1)
6565
it.hasShadow = true
6666
it.contentView = NSHostingView(
6767
rootView: TabView(chatWindowViewModel: chatWindowViewModel)
@@ -81,7 +81,7 @@ public final class SuggestionWidgetController: NSObject {
8181
it.isReleasedWhenClosed = false
8282
it.isOpaque = false
8383
it.backgroundColor = .clear
84-
it.level = .floating
84+
it.level = .init(NSWindow.Level.floating.rawValue + 1)
8585
it.hasShadow = true
8686
it.contentView = NSHostingView(
8787
rootView: SuggestionPanelView(viewModel: suggestionPanelViewModel)
@@ -318,7 +318,7 @@ public extension SuggestionWidgetController {
318318
// looks like we need a delay.
319319
try await Task.sleep(nanoseconds: 150_000_000)
320320
NSApplication.shared.activate(ignoringOtherApps: true)
321-
panelWindow.orderFront(nil)
321+
panelWindow.makeKey()
322322
}
323323
}
324324
}

0 commit comments

Comments
 (0)