From df91e1a4c233ce7d23b70136b1158fa98d6c59c1 Mon Sep 17 00:00:00 2001 From: Alex Badea Date: Tue, 14 Sep 2010 23:32:36 +0300 Subject: [PATCH] daemon: double check that the display is locked before speaking Closes: #6005 --- src/daemon.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/daemon.c b/src/daemon.c index a645b35..3c6da74 100644 --- a/src/daemon.c +++ b/src/daemon.c @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -50,7 +51,8 @@ static void sig_display_status(DBusGProxy *proxy, const char *status, gpointer u * in the two ButtonPress events being received before the display_status==on * event. Check here if that's the case. */ - if (app->display_on && app->press_count > 1 && time(NULL) - app->last_press <= 1) + if (app->mode_locked && app->display_on && app->press_count > 1 && + time(NULL) - app->last_press <= 1) speak_time(app); } -- 1.7.9.5