Here's a bit of doc how #phosh's session is set and what it interacts with: https://honk.sigxcpu.org/projects/phosh/docs/ch01.html
/cc @x51@cybre.space
@agx @x51@cybre.space Are there concepts of active/inactive applications? if yes - how to switch ti "inactive" state without swithing to another app (eg switch to desktop)?
@agx @x51@cybre.space I define it as the one which does not have display focus (user interaction), the one which executes in the background. On sailfish it is used to switch from normal/interactive to powersave/inactive mode. It is then up to developer how to make use of that inactive mode to extend battery life (considering user is not interacting with the app)
@ruff @x51@cybre.space you can do that today by looking at https://developer.gnome.org/gtk3/stable/GtkApplication.html#GtkApplication--screensaver-active and we have apps doing that already.
@agx @x51@cybre.space I would expect it rather opposite :) the screensaver (system-active) to be on a well-known dbus path and top-of-the-stack (app-active) to be toolkit-specific.
@agx @x51@cybre.space The reason being - system-activeness will likely be used by system services (non-toolkit apps) and top-of-the-stack while is a shell concept may still be wrapped into toolkit.
@ruff @x51@cybre.space did you look at the code? It is a well known DBus path abstacted by the toolkit (here GTK).
@agx @x51@cybre.space I did, but in here [1] it's just a static boolean property, not sure what is supposed to track it.
1 - https://gitlab.gnome.org/GNOME/gtk/-/blob/master/gtk/gtkapplication.c#L1206
@ruff @x51@cybre.space that shpi;d't be hard to add but needs to happen in a DE agnostic way so we can hook it into e.g. GApplication.
@agx @x51@cybre.space And this is in addition to system-inactive mode (which is when display is locked or off - neither application is active and even services may try to suspend activity to the bare minimum only to poll the states and keep notifications flying