Repository navigation
Cap idle timeouts to the largest Qt Timer interval - #13921
Coding-Sparrow wants to merge 3 commits into
Conversation
|
|
Clean fix for #13920 — capping at Nit (non-blocking): a capped lock still eventually fires (~24.8 days). If the intended UX for "never" is stay-awake / omit the key, a one-line manual note would save the next person who picks a huge number. |
|
Thanks @jandrusk! Added a note to the Idle section of the manual in 9d18dd5: huge values are capped at ~24.8 days and still lock eventually, so use stay awake ( |
quattro's idle-timeout-zero fix (omacom#12538) added its own assertions beside the ones this branch adds to test/shell.d/idle-test.sh; both sets are kept. The cap in secondsFromConfig still covers both Timer intervals, which quattro now sets imperatively from the same delay properties. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reviewed and verified on a disposable VM built from the Omarchy ISO, running the shell from this branch. Reproduction. I set Pushed. The branch conflicted with Tests. Second opinion. Codex Medium read the change and found nothing wrong. Its only note was that the third new assertion would also pass on a zero result; the two exact-value assertions before it are what pin the cap. It had access to this review's reasoning, so its agreement is not independent. A side note: since #12538, This now waits on the maintainer. |
Fixes #13920
Summary
Idle timeouts larger than a Qt
Timerinterval can hold overflowed. Qt then clamped the interval to 1 ms, and the shell logged a warning on every tick until the log filled/run/user/$UID. This PR caps the configured seconds at the largest value that still fits in an interval.screensaverandlockare both read throughsecondsFromConfig, so their delays, and thelockDelaySeconds * 1000interval computed from them, now stay within the int32 limit.Evidence
test/shell.d/idle-test.sh:I also ran the rest of
./test/shellon this machine. The same 11 files fail with and without this change. They depend on the local environment (migrations, snapper, browser and similar), and none of them touch idle.Merge Danger
Door: two-way
Blast Radius: tiny
This only changes behavior for values above 2147483 s (about 24.8 days). Those values were already broken. With the fix, the screen locks after about 24.8 days of idle instead of flooding the log.