Don't fire a pending idle action whose timeout was set to 0
The timers' intervals are bound to the configured delays, so setting the lock or screensaver to 0 while the screensaver is up turns a pending timer's interval to 0 and it fires at once. Check the action is still enabled when its timer fires. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
14921a956e
commit
377b15be4b
2 files changed
+10
-2
No files matched your search
@@ -267,14 +267,14 @@ Item {
|
||||
id: screensaverTimer
|
||||
interval: root.screensaverDelaySeconds * 1000
|
||||
repeat: false
|
||||
onTriggered: root.launchScreensaver()
|
||||
onTriggered: if (root.screensaverEnabled) root.launchScreensaver()
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: lockTimer
|
||||
interval: root.lockDelaySeconds * 1000
|
||||
repeat: false
|
||||
onTriggered: if (root.idleEnabled && root.idledThisCycle) root.lockSystem("lock-timeout")
|
||||
onTriggered: if (root.idleEnabled && root.idledThisCycle && root.lockEnabled) root.lockSystem("lock-timeout")
|
||||
}
|
||||
|
||||
Timer {
|
||||
|
||||
Reference in new issue
Block a user