Index: evdev.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/input/evdev/evdev.c,v retrieving revision 1.3 diff -u -d -r1.3 evdev.c --- evdev.c 18 Jan 2005 20:18:09 -0000 1.3 +++ evdev.c 9 May 2005 18:18:41 -0000 @@ -33,6 +33,10 @@ #include +#ifndef EVIOCGRAB +#define EVIOCGRAB _IOW('E', 0x90, int) +#endif + #include #include #include @@ -490,11 +494,17 @@ 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;