From a8c56d8230352553b30c9b91648041bfe2bb0655 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 7 Mar 2014 14:27:05 +1000 Subject: [PATCH synaptics 1/2] syndaemon: exit if the device idle timer failed to init Signed-off-by: Peter Hutterer --- tools/syndaemon.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/syndaemon.c b/tools/syndaemon.c index 8e4dbc1..bd91343 100644 --- a/tools/syndaemon.c +++ b/tools/syndaemon.c @@ -1025,6 +1025,13 @@ main(int argc, char *argv[]) pstick_enter_idle_alarm = setup_device_alarm(display, pstick_id, XSyncPositiveTransition, idle_time * 1000); + + if (pstick_leave_idle_alarm == 0 || pstick_enter_idle_alarm == 0) { + fprintf(stderr, "Monitoring of pointing stick requested, but " + "device idletimers could not be initialized.\n"); + exit(5); + } + } #ifdef HAVE_X11_EXTENSIONS_RECORD_H -- 1.8.5.3