--- evdev.c.orig 2009-04-29 23:38:43.000000000 -0700 +++ evdev.c 2009-05-20 21:47:11.000000000 -0700 @@ -362,6 +362,10 @@ switch (ev->type) { case EV_REL: + /* Ignore EV_REL events if we never set up for them. */ + if (! (pEvdev->flags & EVDEV_RELATIVE_EVENTS)) + break; + /* Handle mouse wheel emulation */ if (EvdevWheelEmuFilterMotion(pInfo, ev)) break; @@ -392,6 +396,11 @@ break; case EV_ABS: + /* Ignore EV_ABS events if we never set up for them (which + can happen for either of these two reasons) . */ + if (EVDEV_RELATIVE_EVENTS || ! (pEvdev->flags & EVDEV_ABSOLUTE_EVENTS)) + break; + if (ev->code > ABS_MAX) break; pEvdev->vals[pEvdev->axis_map[ev->code]] = value;