projects
/
espeaktime
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
de03e3d
)
daemon: double check that the display is locked before speaking
author
Alex Badea
<vamposdecampos@gmail.com>
Tue, 14 Sep 2010 20:32:36 +0000
(23:32 +0300)
committer
Alex Badea
<vamposdecampos@gmail.com>
Tue, 14 Sep 2010 20:32:36 +0000
(23:32 +0300)
Closes: #6005
src/daemon.c
patch
|
blob
|
history
diff --git
a/src/daemon.c
b/src/daemon.c
index
a645b35
..
3c6da74
100644
(file)
--- a/
src/daemon.c
+++ b/
src/daemon.c
@@
-1,5
+1,6
@@
#include <string.h>
#include <stdlib.h>
#include <string.h>
#include <stdlib.h>
+#include <signal.h>
#include <time.h>
#include <glib.h>
#include <dbus/dbus-glib.h>
#include <time.h>
#include <glib.h>
#include <dbus/dbus-glib.h>
@@
-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.
*/
* 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);
}
speak_time(app);
}