diff --git a/src/evdev.c b/src/evdev.c index cd0fb6c..ca9dc6f 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -386,7 +386,7 @@ EvdevProcessValuators(InputInfoPtr pInfo, int v[MAX_VALUATORS], int *num_v, for (i = 0; i < REL_CNT; i++) { int map = pEvdev->axis_map[i]; - if (map != -1) + if (pEvdev->delta[i] && map != -1) { v[map] = pEvdev->delta[i]; if (map < first) @@ -500,7 +500,10 @@ EvdevProcessRelativeMotionEvent(InputInfoPtr pInfo, struct input_event *ev) EvdevQueueButtonClicks(pInfo, wheel_left_button, -value); break; - /* We don't post wheel events as axis motion. */ + case REL_MISC: + break; + + /* We don't post wheel/misc events as axis motion. */ default: /* Ignore EV_REL events if we never set up for them. */ if (!(pEvdev->flags & EVDEV_RELATIVE_EVENTS)) @@ -662,7 +665,7 @@ static void EvdevProcessSyncEvent(InputInfoPtr pInfo, struct input_event *ev) { int num_v = 0, first_v = 0; - int v[MAX_VALUATORS]; + int v[MAX_VALUATORS] = {}; EvdevPtr pEvdev = pInfo->private; EvdevProcessValuators(pInfo, v, &num_v, &first_v);