File tree Expand file tree Collapse file tree
Core/Sources/SuggestionWidget Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -515,10 +515,7 @@ extension SuggestionWidgetController {
515515 }
516516 }
517517
518- /// Update the window location.
519- ///
520- /// - note: It's possible to get the scroll view's position by getting position on the focus
521- /// element.
518+ /// Update the window location and opacity.
522519 private func updateWindowLocation( animated: Bool = false ) {
523520 let detachChat = chatWindowViewModel. chatPanelInASeparateWindow
524521
@@ -582,10 +579,11 @@ extension SuggestionWidgetController {
582579 app. bundleIdentifier == Bundle . main. bundleIdentifier
583580 {
584581 let noFocus = {
585- guard let xcode = ActiveApplicationMonitor . latestXcode else { return true }
586- let application = AXUIElementCreateApplication ( xcode. processIdentifier)
587- return application
588- . focusedWindow == nil || ( application. focusedWindow? . role == " AXWindow " )
582+ guard let xcode = XcodeInspector . shared. latestActiveXcode else { return true }
583+ if let window = xcode. appElement. focusedWindow, window. role == " AXWindow " {
584+ return false
585+ }
586+ return true
589587 } ( )
590588
591589 panelWindow. alphaValue = noFocus ? 0 : 1
You can’t perform that action at this time.
0 commit comments