mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-04 12:52:06 -04:00
wallpaper: Only pause cycling when screen is locked or active window is fullscreen (#1553)
This commit is contained in:
@@ -12,16 +12,16 @@ Singleton {
|
||||
id: root
|
||||
|
||||
property bool cyclingActive: false
|
||||
readonly property bool anyFullscreen: {
|
||||
readonly property bool fullscreenShowing: {
|
||||
if (!ToplevelManager.toplevels?.values)
|
||||
return false;
|
||||
for (const toplevel of ToplevelManager.toplevels.values) {
|
||||
if (toplevel.fullscreen)
|
||||
if (toplevel.fullscreen && toplevel.activated)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
readonly property bool shouldPauseCycling: anyFullscreen || SessionService.locked
|
||||
readonly property bool shouldPauseCycling: fullscreenShowing || SessionService.locked
|
||||
property string cachedCyclingTime: SessionData.wallpaperCyclingTime
|
||||
property int cachedCyclingInterval: SessionData.wallpaperCyclingInterval
|
||||
property string lastTimeCheck: ""
|
||||
@@ -35,7 +35,7 @@ Singleton {
|
||||
property string targetScreen: ""
|
||||
running: false
|
||||
repeat: true
|
||||
onTriggered: {
|
||||
onTriggered: {
|
||||
if (typeof WallpaperCyclingService !== "undefined" && targetScreen !== "" && !WallpaperCyclingService.shouldPauseCycling) {
|
||||
WallpaperCyclingService.cycleNextForMonitor(targetScreen);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user