shell: Go straight to sleep if the sceensaver isn't configured

If the screensaver path is not set, nothing would set the compositor
state to sleeping. In that case, outpus DPMS state was never set to
off.
This commit is contained in:
Ander Conselvan de Oliveira 2013-02-22 14:16:19 +02:00 committed by Kristian Høgsberg
parent b17537e2c5
commit dda9d78ec9

View file

@ -2167,8 +2167,10 @@ launch_screensaver(struct desktop_shell *shell)
if (shell->screensaver.binding)
return;
if (!shell->screensaver.path)
if (!shell->screensaver.path) {
weston_compositor_sleep(shell->compositor);
return;
}
if (shell->screensaver.process.pid != 0) {
weston_log("old screensaver still running\n");