Skip to content

Enable/Disable screensaver toggle #616

Closed as not planned
Closed as not planned

Description

@rukai

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.

Activity

  1. added
    S - enhancement
    H - help wanted
    on Aug 5, 2018
  2. Osspial commented on Apr 24, 2019

    @Osspial
    Contributor

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

  3. n1ght-hunter commented on Jul 9, 2024

    @n1ght-hunter

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

  4. madsmtm commented on Jul 11, 2024

    @madsmtm
    Member

    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).

  5. kchibisov commented on Jul 11, 2024

    @kchibisov
    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.

  6. kchibisov commented on Jul 11, 2024

    @kchibisov
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    H - help wantedS - enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions