Skip to content

Commit df1b05a

Browse files
committed
Adjust order front behavior
1 parent 9f6119a commit df1b05a

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

Core/Sources/Preferences/Keys.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public struct UserDefaultPreferenceKeys {
126126
}
127127

128128
public struct ForceOrderWidgetToFront: UserDefaultPreferenceKey {
129-
public let defaultValue = false
129+
public let defaultValue = true
130130
public let key = "ForceOrderWidgetToFront"
131131
}
132132

Core/Sources/SuggestionWidget/SuggestionWidgetController.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,11 @@ extension SuggestionWidgetController {
315315
}
316316
317317
self.updateWindowLocation(animated: false)
318-
if UserDefaults.shared.value(for: \.forceOrderWidgetToFront) {
318+
319+
if UserDefaults.shared.value(for: \.forceOrderWidgetToFront)
320+
|| notification.name == kAXWindowMovedNotification
321+
{
322+
// We need to bring them front when the app enters fullscreen.
319323
panelWindow.orderFront(nil)
320324
widgetWindow.orderFront(nil)
321325
tabWindow.orderFront(nil)

0 commit comments

Comments
 (0)