- touchpad->device->rel.dx = wl_fixed_from_double(dx);
- touchpad->device->rel.dy = wl_fixed_from_double(dy);
- touchpad->device->pending_events |= EVDEV_RELATIVE_MOTION;
+ if (touchpad->finger_state == TOUCHPAD_FINGERS_ONE) {
+ touchpad->device->rel.dx = wl_fixed_from_double(dx);
+ touchpad->device->rel.dy = wl_fixed_from_double(dy);
+ touchpad->device->pending_events |=
+ EVDEV_RELATIVE_MOTION;
+ } else if (touchpad->finger_state == TOUCHPAD_FINGERS_TWO) {
+ if (dx != 0.0)
+ notify_axis(touchpad->device->seat,
+ time,
+ WL_POINTER_AXIS_HORIZONTAL_SCROLL,
+ wl_fixed_from_double(dx));
+ if (dy != 0.0)
+ notify_axis(touchpad->device->seat,
+ time,
+ WL_POINTER_AXIS_VERTICAL_SCROLL,
+ wl_fixed_from_double(dy));
+ }