aboutsummaryrefslogtreecommitdiff
path: root/src/keypress_thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/keypress_thread.c')
-rw-r--r--src/keypress_thread.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/keypress_thread.c b/src/keypress_thread.c
index 47fb1de..a174968 100644
--- a/src/keypress_thread.c
+++ b/src/keypress_thread.c
@@ -5,13 +5,19 @@
#include "common.h"
+static pid_t light_pid;
+
void on_press(void) {
gettimeofday(last_press, NULL);
+ kill(light_pid, SIGCONT);
+
// XXX signal light thread
}
-int keypress_thread(void) {
+int keypress_thread(pid_t _light_pid) {
+ light_pid = _light_pid;
+
FILE* fp = fopen(KEYBOARD_FILE, "r");
fseek(fp, 0, SEEK_END);