diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/evdev.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/evdev.c b/src/evdev.c index 311f678..8e26c4d 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -900,12 +900,15 @@ EvdevProc(DeviceIntPtr device, int what) if (!pEvdev->kernel24 && ioctl(pInfo->fd, EVIOCGRAB, (void *)1)) xf86Msg(X_WARNING, "%s: Grab failed (%s)\n", pInfo->name, strerror(errno)); - xf86AddEnabledDevice(pInfo); - if (pEvdev->flags & EVDEV_BUTTON_EVENTS) - EvdevMBEmuPreInit(pInfo); - device->public.on = TRUE; + if (errno != ENODEV) + { + xf86AddEnabledDevice(pInfo); + if (pEvdev->flags & EVDEV_BUTTON_EVENTS) + EvdevMBEmuPreInit(pInfo); + device->public.on = TRUE; + } break; - + case DEVICE_OFF: if (!pEvdev->kernel24 && ioctl(pInfo->fd, EVIOCGRAB, (void *)0)) xf86Msg(X_WARNING, "%s: Release failed (%s)\n", pInfo->name, |