diff options
author | Peter Osterlund <petero2@telia.com> | 2003-09-28 15:23:54 +0200 |
---|---|---|
committer | Peter Osterlund <petero2@telia.com> | 2006-04-09 04:01:13 +0200 |
commit | 8c8177561c7baa0f2d0b3b974f67aa85b4f73c09 (patch) | |
tree | 8516b2419bc467a5514a3ab657e8a235ab1b52ec /synaptics.c | |
parent | e3413da67be91dd32e01e6eb8918101eb4f25361 (diff) |
When using the Linux 2.6 event device, try to get exclusive
access to the device, so that touchpad data doesn't leak to
/dev/input/mice.
Diffstat (limited to 'synaptics.c')
-rw-r--r-- | synaptics.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/synaptics.c b/synaptics.c index 72e34b9..56b38c8 100644 --- a/synaptics.c +++ b/synaptics.c @@ -478,6 +478,16 @@ DeviceOn (DeviceIntPtr dev) return !Success; } + /* Try to grab the event device so that data doesn't leak to /dev/input/mice */ + if (priv->proto == SYN_PROTO_EVENT) { + int ret; + SYSCALL(ret = ioctl(local->fd, EVIOCGRAB, (pointer)1)); + if (ret < 0) { + xf86Msg(X_WARNING, "%s can't grab event device\n", + local->name, errno); + } + } + priv->buffer = XisbNew(local->fd, 64); if (!priv->buffer) { xf86CloseSerial(local->fd); |