New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added: Inhibit screensaver builtin #16345
Conversation
I'd rather not add to the complexity of the screensaver stuff until we can properly break out the screensaver (and dpms) from |
@lrusak : No problem. Will rebase on your work as soon as it's in mainline |
/// , | ||
/// Inhibit the screensaver | ||
/// } | ||
/// \table_row2_l{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe make it a more detailed, e.g.:
/// \table_row2_l{
/// <b>`InhibitScreensaver(yesNo)`</b>
/// ,
/// Inhibit the screensaver
/// @param[in] yesNo value with "true" or "false" to inhibit or allow screensaver (leaved empty force to true)
/// }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise I find this request very good and helpful for my web browser addon 😊 (to avoid screensaver on webvideo)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlwinEsch : Thanks for the review I'll incorporate your suggestions in this PR.
A good next step would be to turn the inhibition into a context manager so that multiple clients could use the builtin |
@garbear: Not sure what you mean by that. Why isn't it possible now to use it by multiple clients? |
Alice: inhibit |
(work account) to fix this, you can use an object with context that reserves a "handle" given to it by an inhibitor. Both Alice and Bob would acquire a handle, and shutdown is inhibited as long as handles are outstanding. that way, Alice and Bob can operate without knowing about each other |
You simply mean using a refcounter then, right? Do note that we need to do this for other stuff as well then like the shutdown inhibiter builtin. |
Yes, I recommend adding refcounting where two agents want to access the shared state. |
@garbear : After some thought, I think this should be done separately from this PR since it also affects several other builtins (like the shutdown inhibiter). |
sounds good |
b65ec49
to
8e1c3de
Compare
Description
This implements a new builtin to prevent the screensaver from starting. Currently there are other "hacks" out there to accomplish this, but with this builtin there is a "proper" way now.
Motivation and Context
It implements a new feature
How Has This Been Tested?
Some very sophisticated Python scripting ;-)
Screenshots (if appropriate):
Types of change
Checklist: