#include <string.h>
#include <stdlib.h>
+#include <signal.h>
#include <time.h>
#include <glib.h>
#include <dbus/dbus-glib.h>
* 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);
}