File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Core/Sources/SuggestionWidget Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -555,14 +555,17 @@ extension SuggestionWidgetController {
555555 }
556556
557557 if let app = ActiveApplicationMonitor . activeApplication, app. isXcode {
558- panelWindow. alphaValue = 1
559- widgetWindow. alphaValue = 1
560- tabWindow. alphaValue = 1
558+ let application = AXUIElementCreateApplication ( app. processIdentifier)
559+ /// We need this to hide the windows when Xcode is minimized.
560+ let noFocus = application. focusedWindow == nil
561+ panelWindow. alphaValue = noFocus ? 0 : 1
562+ widgetWindow. alphaValue = noFocus ? 0 : 1
563+ tabWindow. alphaValue = noFocus ? 0 : 1
561564
562565 if detachChat {
563566 chatWindow. alphaValue = chatWindowViewModel. chat != nil ? 1 : 0
564567 } else {
565- chatWindow. alphaValue = 1
568+ chatWindow. alphaValue = noFocus ? 0 : 1
566569 }
567570 } else if let app = ActiveApplicationMonitor . activeApplication,
568571 app. bundleIdentifier == Bundle . main. bundleIdentifier
You can’t perform that action at this time.
0 commit comments