aboutsummaryrefslogtreecommitdiff
path: root/src/evdev.h
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2013-05-29 07:17:41 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2013-10-04 16:19:19 +1000
commit164c62a97591d4c9b649460e7442977ea82ac02b (patch)
tree0c29a85f315718831a63f656600ff6dbfd73542c /src/evdev.h
parentUse helper function for counting slots (diff)
downloadxf86-input-evdev-164c62a97591d4c9b649460e7442977ea82ac02b.tar.gz
xf86-input-evdev-164c62a97591d4c9b649460e7442977ea82ac02b.tar.bz2
xf86-input-evdev-164c62a97591d4c9b649460e7442977ea82ac02b.zip
Use libevdev as backend
Removes the need to ioctl manually and check bits, with all the dangers that come with that. libevdev is much better prepared for invalid values, OOB checks, etc. Plus, we get almost free SYN_DROPPED handling as well which we didn't have before. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'src/evdev.h')
-rw-r--r--src/evdev.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/evdev.h b/src/evdev.h
index 4742b43..563d108 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -47,6 +47,8 @@
#include <mtdev.h>
#endif
+#include <libevdev/libevdev.h>
+
#ifndef EV_CNT /* linux 2.6.23 kernels and earlier lack _CNT defines */
#define EV_CNT (EV_MAX+1)
#endif
@@ -150,8 +152,7 @@ typedef struct {
} EventQueueRec, *EventQueuePtr;
typedef struct {
- unsigned short id_vendor;
- unsigned short id_product;
+ struct libevdev *dev;
char *device;
int grabDevice; /* grab the event device? */
@@ -234,13 +235,6 @@ typedef struct {
int reopen_left; /* number of attempts left to re-open the device */
OsTimerPtr reopen_timer;
- /* Cached info from device. */
- unsigned long bitmask[NLONGS(EV_CNT)];
- unsigned long key_bitmask[NLONGS(KEY_CNT)];
- unsigned long rel_bitmask[NLONGS(REL_CNT)];
- unsigned long abs_bitmask[NLONGS(ABS_CNT)];
- struct input_absinfo absinfo[ABS_CNT];
-
/* minor/major number */
dev_t min_maj;