diff --git a/Loop.xcodeproj/xcshareddata/xcschemes/Loop.xcscheme b/Loop.xcodeproj/xcshareddata/xcschemes/Loop.xcscheme index ff96d07c..dfd78761 100644 --- a/Loop.xcodeproj/xcshareddata/xcschemes/Loop.xcscheme +++ b/Loop.xcodeproj/xcshareddata/xcschemes/Loop.xcscheme @@ -10,7 +10,7 @@ ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction"> ("radialMenuVisibility", default: true, iCloud: true) - static let disableCursorInteraction = Key("disableCursorInteraction", default: false, iCloud: true) static let radialMenuCornerRadius = Key("radialMenuCornerRadius", default: 50, iCloud: true) static let radialMenuThickness = Key("radialMenuThickness", default: 22, iCloud: true) @@ -91,6 +90,8 @@ extension Defaults.Keys { // Advanced static let animateWindowResizes = Key("animateWindowResizes", default: false, iCloud: true) // BETA + static let disableCursorInteraction = Key("disableCursorInteraction", default: false, iCloud: true) + static let ignoreFullscreen = Key("ignoreFullscreen", default: false, iCloud: true) static let hideUntilDirectionIsChosen = Key("hideUntilDirectionIsChosen", default: false, iCloud: true) static let hapticFeedback = Defaults.Key("hapticFeedback", default: true, iCloud: true) diff --git a/Loop/Localizable.xcstrings b/Loop/Localizable.xcstrings index 0e8222de..634ef0fb 100644 --- a/Loop/Localizable.xcstrings +++ b/Loop/Localizable.xcstrings @@ -3441,6 +3441,9 @@ } } } + }, + "Ignore fullscreen windows" : { + }, "Import" : { "localizations" : { diff --git a/Loop/Luminare/Loop/AdvancedConfiguration.swift b/Loop/Luminare/Loop/AdvancedConfiguration.swift index b81af96d..30370bc4 100644 --- a/Loop/Luminare/Loop/AdvancedConfiguration.swift +++ b/Loop/Luminare/Loop/AdvancedConfiguration.swift @@ -23,6 +23,10 @@ class AdvancedConfigurationModel: ObservableObject { didSet { Defaults[.disableCursorInteraction] = disableCursorInteraction } } + @Published var ignoreFullscreen = Defaults[.ignoreFullscreen] { + didSet { Defaults[.ignoreFullscreen] = ignoreFullscreen } + } + @Published var hapticFeedback = Defaults[.hapticFeedback] { didSet { Defaults[.hapticFeedback] = hapticFeedback } } @@ -70,6 +74,7 @@ struct AdvancedConfigurationView: View { isOn: $model.animateWindowResizes ) LuminareToggle("Disable cursor interaction", isOn: $model.disableCursorInteraction) + LuminareToggle("Ignore fullscreen windows", isOn: $model.ignoreFullscreen) LuminareToggle("Hide until direction is chosen", isOn: $model.hideUntilDirectionIsChosen) LuminareToggle("Haptic feedback", isOn: $model.hapticFeedback) diff --git a/Loop/Managers/LoopManager.swift b/Loop/Managers/LoopManager.swift index d0a534bf..46fa1760 100644 --- a/Loop/Managers/LoopManager.swift +++ b/Loop/Managers/LoopManager.swift @@ -95,7 +95,12 @@ private extension LoopManager { } targetWindow = WindowEngine.getTargetWindow() - guard targetWindow?.isAppExcluded != true else { return } + guard + targetWindow?.isAppExcluded != true, + (targetWindow?.fullscreen ?? false && Defaults[.ignoreFullscreen]) == false + else { + return + } // Only recalculate wallpaper colors if Loop was last triggered over 5 seconds ago if Defaults[.processWallpaper], lastLoopActivation.distance(to: .now) > 5.0 {