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 @@ -261,9 +261,7 @@ public struct WidgetFeature: ReducerProtocol {
261261 guard let windowsController,
262262 await windowsController. windows. fullscreenDetector. isOnActiveSpace
263263 else { continue }
264- let app = AXUIElementCreateApplication (
265- activeXcode. processIdentifier
266- )
264+ let app = activeXcode. appElement
267265 if let _ = app. focusedWindow {
268266 await windowsController. windows. orderFront ( )
269267 }
Original file line number Diff line number Diff line change @@ -93,8 +93,6 @@ actor WidgetWindowsController: NSObject {
9393 let shouldDebounce = !immediately &&
9494 !( Date ( ) . timeIntervalSince ( lastUpdateWindowOpacityTime) > 5 )
9595 lastUpdateWindowOpacityTime = Date ( )
96- let activeApp = xcodeInspector. activeApplication
97-
9896 updateWindowOpacityTask? . cancel ( )
9997
10098 let task = Task {
@@ -103,11 +101,10 @@ actor WidgetWindowsController: NSObject {
103101 }
104102 try Task . checkCancellation ( )
105103 let xcodeInspector = self . xcodeInspector
104+ let activeApp = xcodeInspector. activeApplication
106105 await MainActor . run {
107106 if let activeApp, activeApp. isXcode {
108- let application = AXUIElementCreateApplication (
109- activeApp. processIdentifier
110- )
107+ let application = activeApp. appElement
111108 /// We need this to hide the windows when Xcode is minimized.
112109 let noFocus = application. focusedWindow == nil
113110 windows. sharedPanelWindow. alphaValue = noFocus ? 0 : 1
You can’t perform that action at this time.
0 commit comments