Skip to content
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

Enable/Disable screensaver toggle #616

Closed
rukai opened this issue Jul 28, 2018 · 5 comments
Closed

Enable/Disable screensaver toggle #616

rukai opened this issue Jul 28, 2018 · 5 comments
Labels
H - help wanted Someone please save us S - enhancement Wouldn't this be the coolest?

Comments

@rukai
Copy link
Contributor

rukai commented Jul 28, 2018

I need a method on the window to disable/enable the screensaver.
When the window is closed the screensaver should be automatically reset to its previous state.
From memory resetting the screensaver state is normally handled by the os screensaver toggling api which takes a handle to the window and automatically resets when the window is closed closed.

I am somewhat familiar with the dolphin implementation of this https://github.com/dolphin-emu/dolphin/blob/master/Source/Core/UICommon/UICommon.cpp#L365 and am happy to implement it for winit some time (windows + linux only), although I wont be free to do so in a long while, so I thought I'd post here in case anyone wanted to pick this up.

@francesca64 francesca64 added S - enhancement Wouldn't this be the coolest? H - help wanted Someone please save us labels Aug 5, 2018
@Osspial
Copy link
Contributor

Osspial commented Apr 24, 2019

Is there any reason this can't be implemented outside of Winit? My gut feeling is to close this as out of scope.

@n1ght-hunter
Copy link

this should be closed as out of scope.
#695 (comment)

@madsmtm
Copy link
Member

madsmtm commented Jul 11, 2024

Indeed, this is out of scope of Winit, and just from a quick search I found the keepawake crate, which seems to do exactly what you need? (not endorsement, I haven't looked at the code myself)

(If for some reason parts of this cannot be cleanly implemented outside of Winit, then feel free to ask, we're open to adding extension points to allow doing so).

@madsmtm madsmtm closed this as not planned Won't fix, can't repro, duplicate, stale Jul 11, 2024
@kchibisov
Copy link
Member

It's not, see #3351 the reasoning is for apps to indicate that they show something that doesn't require user input, like media players.

@kchibisov
Copy link
Member

Anyway, I'll keep the more recent issue opened since it lists all the APIs which should be used to handle that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
H - help wanted Someone please save us S - enhancement Wouldn't this be the coolest?
Development

No branches or pull requests

6 participants