mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-12 00:32:17 -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
|
id: root
|
||||||
|
|
||||||
property bool cyclingActive: false
|
property bool cyclingActive: false
|
||||||
readonly property bool anyFullscreen: {
|
readonly property bool fullscreenShowing: {
|
||||||
if (!ToplevelManager.toplevels?.values)
|
if (!ToplevelManager.toplevels?.values)
|
||||||
return false;
|
return false;
|
||||||
for (const toplevel of ToplevelManager.toplevels.values) {
|
for (const toplevel of ToplevelManager.toplevels.values) {
|
||||||
if (toplevel.fullscreen)
|
if (toplevel.fullscreen && toplevel.activated)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
readonly property bool shouldPauseCycling: anyFullscreen || SessionService.locked
|
readonly property bool shouldPauseCycling: fullscreenShowing || SessionService.locked
|
||||||
property string cachedCyclingTime: SessionData.wallpaperCyclingTime
|
property string cachedCyclingTime: SessionData.wallpaperCyclingTime
|
||||||
property int cachedCyclingInterval: SessionData.wallpaperCyclingInterval
|
property int cachedCyclingInterval: SessionData.wallpaperCyclingInterval
|
||||||
property string lastTimeCheck: ""
|
property string lastTimeCheck: ""
|
||||||
@@ -35,7 +35,7 @@ Singleton {
|
|||||||
property string targetScreen: ""
|
property string targetScreen: ""
|
||||||
running: false
|
running: false
|
||||||
repeat: true
|
repeat: true
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
if (typeof WallpaperCyclingService !== "undefined" && targetScreen !== "" && !WallpaperCyclingService.shouldPauseCycling) {
|
if (typeof WallpaperCyclingService !== "undefined" && targetScreen !== "" && !WallpaperCyclingService.shouldPauseCycling) {
|
||||||
WallpaperCyclingService.cycleNextForMonitor(targetScreen);
|
WallpaperCyclingService.cycleNextForMonitor(targetScreen);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user