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 @@ -325,6 +325,17 @@ extension SuggestionWidgetController {
325325 guard let self else { return }
326326 try Task.checkCancellation()
327327
328+ self.updateWindowLocation(animated: false)
329+
330+ if UserDefaults.shared.value(for: \. forceOrderWidgetToFront)
331+ || notification. name == kAXWindowMovedNotification
332+ {
333+ // We need to bring them front when the app enters fullscreen.
334+ widgetWindow. orderFront ( nil )
335+ tabWindow. orderFront ( nil )
336+ panelWindow. orderFront ( nil )
337+ }
338+
328339 if [
329340 kAXFocusedUIElementChangedNotification,
330341 kAXApplicationActivatedNotification,
@@ -346,17 +357,6 @@ extension SuggestionWidgetController {
346357 widgetViewModel. currentFileURL = currentFileURL
347358 await updateContentForActiveEditor ( fileURL: fileURL)
348359 }
349-
350- self.updateWindowLocation(animated: false)
351-
352- if UserDefaults.shared.value(for: \. forceOrderWidgetToFront)
353- || notification. name == kAXWindowMovedNotification
354- {
355- // We need to bring them front when the app enters fullscreen.
356- panelWindow. orderFront ( nil )
357- widgetWindow. orderFront ( nil )
358- tabWindow. orderFront ( nil )
359- }
360360 }
361361 }
362362 }
You can’t perform that action at this time.
0 commit comments