Index: config/cf/linux.cf =================================================================== RCS file: /cvs/xorg/xc/config/cf/linux.cf,v retrieving revision 1.26 diff -u -d -r1.26 linux.cf --- config/cf/linux.cf 23 Apr 2005 20:23:44 -0000 1.26 +++ config/cf/linux.cf 10 May 2005 18:04:24 -0000 @@ -791,6 +791,12 @@ # define XF86OSCardDrivers fbdev v4l sisusb #endif +#if (OSMajorVersion > 2) || (OSMajorVersion == 2 && OSMinorVersion >= 6) +# define Linux26InputDrivers evdev +#else +# define Linux26InputDrivers +#endif + #ifndef OSXInputDrivers # if HasLinuxJoystick # define OSXInputDrivers1 ur98 @@ -798,7 +804,7 @@ # define OSXInputDrivers1 /**/ # endif # if HasLinuxInput -# define OSXInputDrivers2 aiptek evdev +# define OSXInputDrivers2 aiptek Linux26InputDrivers # else # define OSXInputDrivers2 /**/ # endif Index: programs/Xserver/hw/xfree86/input/evdev/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 --- programs/Xserver/hw/xfree86/input/evdev/evdev.c 18 Jan 2005 20:18:09 -0000 1.3 +++ programs/Xserver/hw/xfree86/input/evdev/evdev.c 10 May 2005 18:04:28 -0000 @@ -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 @@ } break; - case EV_RST: + case EV_SYN: break; } } @@ -490,11 +486,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;