Add suspend from the top-panel power menu alongside shutdown and logout. This allows far quicker access than waiting for the automatic timeout or typing the command.
As gnome-session/session-manager does not expose a suspend option via DBus, this has been implemented under the screen saver manager which already has the required code for access to logind.
TODO:
-
Use or otherwise remove the on_suspend_finished callback. (screen-saver-manager.c:541) -
Test whether an interactive suspend request would be better (screen-saver-manager.c:555)
Additionally, this MR includes a bugfix for phosh_shell_get_screen_saver_manager which would otherwise always return null.