@@ -20,7 +20,8 @@ public final class SuggestionWidgetController: NSObject {
2020 it. isReleasedWhenClosed = false
2121 it. isOpaque = false
2222 it. backgroundColor = . clear
23- it. level = . init( NSWindow . Level. floating. rawValue + 1 )
23+ it. level = . init( 19 )
24+ it. collectionBehavior = [ . canJoinAllSpaces, . fullScreenAuxiliary]
2425 it. hasShadow = true
2526 it. contentView = NSHostingView (
2627 rootView: WidgetView (
@@ -50,7 +51,8 @@ public final class SuggestionWidgetController: NSObject {
5051 it. isReleasedWhenClosed = false
5152 it. isOpaque = false
5253 it. backgroundColor = . clear
53- it. level = . init( NSWindow . Level. floating. rawValue + 1 )
54+ it. level = . init( 19 )
55+ it. collectionBehavior = [ . canJoinAllSpaces, . fullScreenAuxiliary]
5456 it. hasShadow = true
5557 it. contentView = NSHostingView (
5658 rootView: TabView ( chatWindowViewModel: chatWindowViewModel)
@@ -71,6 +73,7 @@ public final class SuggestionWidgetController: NSObject {
7173 it. isOpaque = false
7274 it. backgroundColor = . clear
7375 it. level = . init( NSWindow . Level. floating. rawValue + 1 )
76+ it. collectionBehavior = [ . canJoinAllSpaces, . fullScreenAuxiliary]
7477 it. hasShadow = true
7578 it. contentView = NSHostingView (
7679 rootView: SuggestionPanelView ( viewModel: suggestionPanelViewModel)
@@ -94,6 +97,7 @@ public final class SuggestionWidgetController: NSObject {
9497 it. isOpaque = false
9598 it. backgroundColor = . clear
9699 it. level = . floating
100+ it. collectionBehavior = [ . canJoinAllSpaces, . fullScreenAuxiliary]
97101 it. hasShadow = true
98102 it. contentView = NSHostingView (
99103 rootView: ChatWindowView ( viewModel: chatWindowViewModel)
@@ -231,7 +235,6 @@ public extension SuggestionWidgetController {
231235 if let suggestion = await dataSource? . suggestionForFile ( at: fileURL) {
232236 suggestionPanelViewModel. content = . suggestion( suggestion)
233237 suggestionPanelViewModel. isPanelDisplayed = true
234- panelWindow. orderFront ( nil )
235238 }
236239 }
237240 }
@@ -251,7 +254,6 @@ public extension SuggestionWidgetController {
251254 suggestionPanelViewModel. content = . error( errorDescription)
252255 suggestionPanelViewModel. isPanelDisplayed = true
253256 widgetViewModel. isProcessing = false
254- panelWindow. orderFront ( nil )
255257 }
256258
257259 func presentChatRoom( fileURL: URL ) {
@@ -269,7 +271,6 @@ public extension SuggestionWidgetController {
269271 // looks like we need a delay.
270272 try await Task . sleep ( nanoseconds: 150_000_000 )
271273 NSApplication . shared. activate ( ignoringOtherApps: true )
272- panelWindow. orderFront ( nil )
273274 }
274275 }
275276 }
@@ -334,16 +335,6 @@ extension SuggestionWidgetController {
334335
335336 self . updateWindowLocation ( animated: false )
336337
337- if UserDefaults . shared. value ( for: \. forceOrderWidgetToFront)
338- || notification. name == kAXWindowMovedNotification
339- {
340- // We need to bring them front when the app enters fullscreen.
341- widgetWindow. orderFront ( nil )
342- tabWindow. orderFront ( nil )
343- chatWindow. orderFront ( nil )
344- panelWindow. orderFront ( nil )
345- }
346-
347338 if [
348339 kAXFocusedUIElementChangedNotification,
349340 kAXApplicationActivatedNotification,
0 commit comments