File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -171,12 +171,12 @@ struct ChatSettingsView: View {
171171 #endif
172172
173173 Toggle ( isOn: $settings. disableFloatOnTopWhenTheChatPanelIsDetached) {
174- Text ( " Disable float on top when the chat panel is detached " )
174+ Text ( " Disable always-on- top when the chat panel is detached " )
175175 }
176176
177177 Toggle ( isOn: $settings. keepFloatOnTopIfChatPanelAndXcodeOverlaps) {
178- Text ( " But, keep float on top if chat panel and Xcode overlaps" )
179- }
178+ Text ( " Keep always-on- top if the chat panel and Xcode overlaps and Xcode is active " )
179+ } . disabled ( !settings . disableFloatOnTopWhenTheChatPanelIsDetached )
180180 }
181181 }
182182
Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ private extension WidgetWindowsController {
8989 updateWindowLocation ( animated: false , immediately: false )
9090 await hideSuggestionPanelWindow ( )
9191 }
92+ await adjustChatPanelWindowLevel ( )
9293 }
9394 guard currentApplicationProcessIdentifier != app. processIdentifier else { return }
9495 currentApplicationProcessIdentifier = app. processIdentifier
@@ -462,7 +463,7 @@ extension WidgetWindowsController {
462463 animate: animated
463464 )
464465 }
465-
466+
466467 await adjustChatPanelWindowLevel ( )
467468 }
468469
@@ -514,7 +515,14 @@ extension WidgetWindowsController {
514515 let floatOnTopWhenOverlapsXcode = UserDefaults . shared
515516 . value ( for: \. keepFloatOnTopIfChatPanelAndXcodeOverlaps)
516517
517- if !floatOnTopWhenOverlapsXcode {
518+ let latestApp = await xcodeInspector. safe. activeApplication
519+ let latestAppIsXcodeOrExtension = if let latestApp {
520+ latestApp. isXcode || latestApp. isExtensionService
521+ } else {
522+ false
523+ }
524+
525+ if !floatOnTopWhenOverlapsXcode || !latestAppIsXcodeOrExtension {
518526 window. setFloatOnTop ( false )
519527 } else {
520528 guard let xcode = await xcodeInspector. safe. latestActiveXcode else { return }
You can’t perform that action at this time.
0 commit comments