summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-03-01 08:41:10 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-03-01 08:41:22 +1000
commitb768d6e1f552a9fae2e02256d057a71186620acc (patch)
treef3d32f23baf4c44d8bfa3d89d73c010f890aaf47 /tools
parent79867e9fb29332deb96e121001b1bcae7937e52c (diff)
synclient: print an error if we can't find the synaptics device.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'tools')
-rw-r--r--tools/synclient.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/synclient.c b/tools/synclient.c
index fda1d88..ec6bc60 100644
--- a/tools/synclient.c
+++ b/tools/synclient.c
@@ -508,7 +508,9 @@ dp_get_device(Display *dpy)
unwind:
XFree(properties);
XFreeDeviceList(info);
- if (error && dev)
+ if (!dev)
+ fprintf(stderr, "Unable to find a synaptics device.\n");
+ else if (error && dev)
{
XCloseDevice(dpy, dev);
dev = NULL;