-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
--idle-timeout-when-locked
for idle timeout when session is loc…
…ked (#3546) Fixes #3306. This PR adds a new configuration option, `--idle-timeout-when-locked`, that allows the compositor to apply a separate idle timeout when the session is locked. The default value is 0, meaning the display will stay on indefinitely when the session is locked. Examples showing its interaction with the existing `--idle-timeout` option: - `--idle-timeout=60 --idle-timeout-when-locked=10`: The display turns off after 60s of idle time when the session is unlocked, and after 10s of idle time when the session is locked. - `--idle-timeout=0 --idle-timeout-when-locked=10`: The display never turns off when idle, but it turns off after 10s of idle time when the session is locked. - `--idle-timeout=60 --idle-timeout-when-locked=0`: The display turns off after 60s of idle time but never when the session is locked. - `--idle-timeout=0 --idle-timeout-on-lock=0`: This is the default behavior. The display never turns off, wether the session is locked or unlocked. ### Implementation details: `BasicIdleHandler` now registers a session lock listener via the `SessionLockListener` class, which takes `on_lock` and `on_unlock` callbacks to track the state of the session lock. When the idle handlers (the dimmer and the power setter) are registered, they will use the timeout value from `--idle-timeout-when-locked` when the session is locked, and from `--idle-timeout` when the session is not locked.
- Loading branch information
Showing
8 changed files
with
278 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.