summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-05-19 09:14:54 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-05-20 08:28:50 +1000
commit44c1de333acf1de22f570a16421e0ff4889b0809 (patch)
treeaaef232e7d1c8096f2983fdf5232d01488546d41
parenta9f8b19ceba8f7652ebdb620fb0785dfa578a218 (diff)
eventcomm: fix return value of event_query_is_touchpad.
"ret" is used both for storing the ioctls return value as well as for the return of event_query_is_touchpad. If an ioctl fails, ret is -1 and we return this value as a BOOL. The caller treats this -1 as TRUE and thinks the device is a touchpad. Bug is triggered if a xorg.conf section is present with auto-dev as device and a mouse event device is openeded before the synaptics event device. Introduced with e4b1571d487cb67bab64e1ee890bddcd02437ddf. Red Hat Bug 499792 <http://bugzilla.redhat.com/show_bug.cgi?id=499792> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
-rw-r--r--src/eventcomm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eventcomm.c b/src/eventcomm.c
index d57f8e6..5ab34c0 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -130,7 +130,7 @@ unwind:
if (grab)
SYSCALL(ioctl(fd, EVIOCGRAB, (pointer)0));
- return ret;
+ return (ret == TRUE);
}
typedef struct {