Daemon/WindowListener: Prevent auto-suspend/idle when going fullscreen#2852
Daemon/WindowListener: Prevent auto-suspend/idle when going fullscreen#2852flodavid wants to merge 1 commit into
Conversation
7a96025 to
5da1b9a
Compare
|
Hmmm IMO the app should do that itself if it wants it rather than us uncoditionally for all fullscreen apps. E.g. it might make sense for videos but I for example use a handwritten note taking app in fullscreen and I definitely want my device to go to sleep if I went to the cafeteria and forgot to suspend it. |
dc06dc4 to
a626f6a
Compare
Adds two methods to the gala daemon that are triggered by gala itself via dbus, because the WindowListener is not inside a GTK Application. One method used when any window goes fullscreen, to mark it as "inhibiting"automatic sleep to the session manager. The other method is to "unhibit" for the given window when it exits fullscreen. Multiple windows can inhibit sleeping, they all must exit fullscreen to restore auto-sleep. NB: If any window is fullscreen, auto sleep is disabled, even if it is not on the current virtual desktop. TODO: add gschema setting for disabling auto suspend when fullscreen
a626f6a to
f60780c
Compare
I mainly use fullscreen modes for videos or games and I do not know many apps that have one, but for those use cases auto-sleep is pretty annoying. |
IMO while we could of course add a setting, settings always bring more untested code paths, more complexity etc. so a settings shouldn't be added lightly: https://docs.elementary.io/hig/design-philosophy/accessible-configuration |
|
Yes, I know about this toggle. But when I launch a game I often forget to toggle it (or to untoggle it after) and it its not accessible when in fullscreen. And changing the virtual desktop can sometimes mess with the game. Same thing when I launch a movie, I forget to activate it before going in my couch. When the screen starts to go black, I do not have the time to jump on the keyboard to stop suspending. Also the computer sometimes just hangs while going to sleep or out of it, so it is extra annoying. |
When an application is in fullscreen, I think it should prevent the system going to sleep automatically. This is annoying especially when looking at videos (especially movies) or when gaming with something else than mouse and keyboard.
I did not found an existing issue about this.
This adds two methods to the gala daemon that are triggered by gala itself via dbus. One is used when any window goes fullscreen, to mark it as "inhibiting" automatic sleep to the session manager. The other method to "unhibit" for the same window when it exits fullscreen. Multiple windows can inhibit sleeping, they all must exit fullscreen to restore auto-sleep.
NB: If any window is fullscreen, auto sleep is disabled, even if it is not on the current virtual desktop.
TODO: add gschema setting for disabling auto suspend when fullscreen.