summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam Jackson <ajax@nwnk.net>2005-05-11 00:13:15 +0000
committerAdam Jackson <ajax@nwnk.net>2005-05-11 00:13:15 +0000
commitdf1b2f476dde1f6cbc13e9731d772a42baf97adb (patch)
treed74d44eaaaa4dc664c0944708928f111649287be /src
parent319e1b28a37c3b5511f0cf8ab627f9e4f0924634 (diff)
Bug #968: Grab the event device used by the evdev driver to avoid weirdXORG-6_8_99_9XORG-6_8_99_8XORG-6_8_99_7XORG-6_8_99_12XORG-6_8_99_11XORG-6_8_99_10
issues when input goes to multiple places. Restrict building the evdev driver to 2.6 kernels since EVIOCGRAB didn't exist in 2.4.
Diffstat (limited to 'src')
-rw-r--r--src/evdev.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 462cfc8..12b0c77 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -61,10 +61,6 @@
#define MODEFLAG 8
#define COMPOSEFLAG 16
-#ifndef EV_RST
-#define EV_RST EV_SYN
-#endif
-
static int wheel_up_button = 4;
static int wheel_down_button = 5;
static int wheel_left_button = 6;
@@ -156,7 +152,7 @@ EvdevReadInput(InputInfoPtr pInfo)
}
break;
- case EV_RST:
+ case EV_SYN:
break;
}
}
@@ -490,11 +486,17 @@ EvdevProc(DeviceIntPtr device, int what)
return EvdevInit(device);
case DEVICE_ON:
+ if (ioctl(pInfo->fd, EVIOCGRAB, (void *)1))
+ xf86Msg(X_WARNING, "%s: Grab failed (%s)\n", pInfo->name,
+ strerror(errno));
xf86AddEnabledDevice(pInfo);
device->public.on = TRUE;
break;
case DEVICE_OFF:
+ if (ioctl(pInfo->fd, EVIOCGRAB, (void *)0))
+ xf86Msg(X_WARNING, "%s: Release failed (%s)\n", pInfo->name,
+ strerror(errno));
xf86RemoveEnabledDevice(pInfo);
device->public.on = FALSE;
break;