You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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).
Activity
Osspial commentedon 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 commentedon Jul 9, 2024
this should be closed as out of scope.
#695 (comment)
madsmtm commentedon Jul 11, 2024
Indeed, this is out of scope of Winit, and just from a quick search I found the
keepawakecrate, 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).
kchibisov commentedon Jul 11, 2024
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 commentedon Jul 11, 2024
Anyway, I'll keep the more recent issue opened since it lists all the APIs which should be used to handle that.