[PATCH weston 2/2] shell: Go straight to sleep if the sceensaver isn't configured

Ander Conselvan de Oliveira ander.conselvan.de.oliveira at intel.com
Fri Feb 22 04:16:19 PST 2013


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.
---
 src/shell.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/shell.c b/src/shell.c
index 93b46e1..6573038 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -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");
-- 
1.7.10.4



More information about the wayland-devel mailing list