diff --git a/patch/diff_libinput_mmi/libinput/libinput_0000.diff b/patch/diff_libinput_mmi/libinput/libinput_0000.diff index 29c1178b11e23d4a4674ab51a095c67a40aa6f5b..1e578cc9b4b022f16eecb737068a654d54286778 100644 --- a/patch/diff_libinput_mmi/libinput/libinput_0000.diff +++ b/patch/diff_libinput_mmi/libinput/libinput_0000.diff @@ -113,7 +113,7 @@ diff -Naur old/export_include/libinput.h new/export_include/libinput.h }; /** -@@ -822,6 +893,13 @@ +@@ -822,6 +893,16 @@ */ LIBINPUT_EVENT_POINTER_SCROLL_CONTINUOUS, @@ -121,13 +121,16 @@ diff -Naur old/export_include/libinput.h new/export_include/libinput.h + LIBINPUT_EVENT_POINTER_MOTION_TOUCHPAD, + LIBINPUT_EVENT_POINTER_BUTTON_TOUCHPAD, + ++ LIBINPUT_EVENT_POINTER_SCROLL_FINGER_BEGIN, ++ LIBINPUT_EVENT_POINTER_SCROLL_FINGER_END, ++ + LIBINPUT_EVENT_JOYSTICK_BUTTON = 450, + LIBINPUT_EVENT_JOYSTICK_AXIS, + LIBINPUT_EVENT_TOUCH_DOWN = 500, LIBINPUT_EVENT_TOUCH_UP, LIBINPUT_EVENT_TOUCH_MOTION, -@@ -832,6 +910,10 @@ +@@ -832,6 +913,10 @@ */ LIBINPUT_EVENT_TOUCH_FRAME, @@ -138,7 +141,7 @@ diff -Naur old/export_include/libinput.h new/export_include/libinput.h /** * One or more axes have changed state on a device with the @ref * LIBINPUT_DEVICE_CAP_TABLET_TOOL capability. This event is only sent -@@ -1084,6 +1166,19 @@ +@@ -1084,6 +1169,19 @@ /** * @ingroup event * @@ -158,7 +161,7 @@ diff -Naur old/export_include/libinput.h new/export_include/libinput.h * Return the gesture event that is this input event. If the event type does * not match the gesture event types, this function returns NULL. * -@@ -1486,6 +1581,21 @@ +@@ -1486,6 +1584,21 @@ /** * @ingroup event_pointer * @@ -180,7 +183,7 @@ diff -Naur old/export_include/libinput.h new/export_include/libinput.h * Check if the event has a valid value for the given axis. * * If this function returns non-zero for an axis and -@@ -1870,6 +1980,120 @@ +@@ -1870,6 +1983,120 @@ uint32_t height); /** @@ -301,7 +304,7 @@ diff -Naur old/export_include/libinput.h new/export_include/libinput.h * @ingroup event_touch * * @return The generic libinput_event of this event -@@ -1878,6 +2102,228 @@ +@@ -1878,6 +2105,228 @@ libinput_event_touch_get_base_event(struct libinput_event_touch *event); /** @@ -530,7 +533,7 @@ diff -Naur old/export_include/libinput.h new/export_include/libinput.h * @defgroup event_gesture Gesture events * * Gesture events are generated when a gesture is recognized on a touchpad. -@@ -2090,6 +2536,49 @@ +@@ -2090,6 +2539,49 @@ libinput_event_gesture_get_angle_delta(struct libinput_event_gesture *event); /** @@ -580,7 +583,7 @@ diff -Naur old/export_include/libinput.h new/export_include/libinput.h * @defgroup event_tablet Tablet events * * Events that come from tools on tablet devices. For events from the pad, -@@ -2817,6 +3306,19 @@ +@@ -2817,6 +3309,19 @@ /** * @ingroup event_tablet * @@ -600,7 +603,7 @@ diff -Naur old/export_include/libinput.h new/export_include/libinput.h * Return the high-level tool type for a tool object. * * The high level tool describes general interaction expected with the tool. -@@ -3663,6 +4165,56 @@ +@@ -3663,6 +4168,56 @@ int libinput_dispatch(struct libinput *libinput); @@ -657,7 +660,7 @@ diff -Naur old/export_include/libinput.h new/export_include/libinput.h /** * @ingroup base * -@@ -4133,6 +4685,42 @@ +@@ -4133,6 +4688,42 @@ const char * libinput_device_get_name(struct libinput_device *device); @@ -700,7 +703,7 @@ diff -Naur old/export_include/libinput.h new/export_include/libinput.h /** * @ingroup device * -@@ -4343,6 +4931,12 @@ +@@ -4343,6 +4934,12 @@ libinput_device_touch_get_touch_count(struct libinput_device *device); /** @@ -713,7 +716,7 @@ diff -Naur old/export_include/libinput.h new/export_include/libinput.h * @ingroup device * * Check if a @ref LIBINPUT_DEVICE_CAP_SWITCH device has a switch of the -@@ -5722,6 +6316,9 @@ +@@ -5722,6 +6319,9 @@ enum libinput_config_click_method libinput_device_config_click_get_default_method(struct libinput_device *device); @@ -723,7 +726,7 @@ diff -Naur old/export_include/libinput.h new/export_include/libinput.h /** * @ingroup config */ -@@ -6398,7 +6995,102 @@ +@@ -6398,7 +6998,102 @@ unsigned int libinput_device_config_rotation_get_default_angle(struct libinput_device *device); @@ -1233,7 +1236,21 @@ diff -Naur old/src/evdev.c new/src/evdev.c default: return false; } -@@ -3163,3 +3311,75 @@ +@@ -2902,10 +3050,9 @@ + if (device->scroll.direction != 0) { + switch (source) { + case LIBINPUT_POINTER_AXIS_SOURCE_FINGER: +- pointer_notify_axis_finger(&device->base, +- time, +- device->scroll.direction, +- &zero); ++ gesture_notify_axis_finger(&device->base, time, ++ LIBINPUT_EVENT_POINTER_SCROLL_FINGER_END, ++ 0, &zero); + break; + case LIBINPUT_POINTER_AXIS_SOURCE_CONTINUOUS: + pointer_notify_axis_continuous(&device->base, +@@ -3163,3 +3310,75 @@ #endif return has_left_handed; } @@ -2835,7 +2852,17 @@ diff -Naur old/src/evdev-mt-touchpad-gestures.c new/src/evdev-mt-touchpad-gestur tp_gesture_init_scroll(struct tp_dispatch *tp) { struct phys_coords zero = {0.0, 0.0}; -@@ -180,7 +211,7 @@ +@@ -169,6 +200,9 @@ + break; + case GESTURE_STATE_SCROLL: + tp_gesture_init_scroll(tp); ++ gesture_notify_axis_finger(&tp->device->base, time, ++ LIBINPUT_EVENT_POINTER_SCROLL_FINGER_BEGIN, ++ 0, &zero); + break; + case GESTURE_STATE_PINCH: + gesture_notify_pinch(&tp->device->base, time, +@@ -180,7 +214,7 @@ gesture_notify_swipe(&tp->device->base, time, LIBINPUT_EVENT_GESTURE_SWIPE_BEGIN, tp->gesture.finger_count, @@ -2844,7 +2871,7 @@ diff -Naur old/src/evdev-mt-touchpad-gestures.c new/src/evdev-mt-touchpad-gestur break; case GESTURE_STATE_POINTER_MOTION: break; -@@ -233,7 +264,7 @@ +@@ -233,7 +267,7 @@ struct device_float_coords unaccel; unaccel = tp_scale_to_xaxis(tp, raw); @@ -2853,7 +2880,7 @@ diff -Naur old/src/evdev-mt-touchpad-gestures.c new/src/evdev-mt-touchpad-gestur time, &delta, &unaccel); -@@ -1190,14 +1221,150 @@ +@@ -1190,14 +1224,150 @@ &delta); } @@ -3004,7 +3031,7 @@ diff -Naur old/src/evdev-mt-touchpad-gestures.c new/src/evdev-mt-touchpad-gestur if (!normalized_is_zero(delta) || !device_float_is_zero(raw)) { unaccel = tp_filter_motion_unaccelerated(tp, &raw, time); -@@ -1205,7 +1372,7 @@ +@@ -1205,7 +1375,7 @@ gesture_notify_swipe(&tp->device->base, time, LIBINPUT_EVENT_GESTURE_SWIPE_UPDATE, tp->gesture.finger_count, @@ -3013,7 +3040,7 @@ diff -Naur old/src/evdev-mt-touchpad-gestures.c new/src/evdev-mt-touchpad-gestur } } -@@ -1269,7 +1436,7 @@ +@@ -1269,7 +1439,7 @@ tp_gesture_handle_state_scroll(tp, time); if (tp->gesture.state == GESTURE_STATE_SWIPE) @@ -3767,13 +3794,15 @@ diff -Naur old/src/libinput.c new/src/libinput.c #define require_event_type(li_, type_, retval_, ...) \ if (type_ == LIBINPUT_EVENT_NONE) abort(); \ -@@ -84,9 +87,14 @@ +@@ -84,9 +87,16 @@ CASE_RETURN_STRING(LIBINPUT_EVENT_DEVICE_ADDED); CASE_RETURN_STRING(LIBINPUT_EVENT_DEVICE_REMOVED); CASE_RETURN_STRING(LIBINPUT_EVENT_KEYBOARD_KEY); + CASE_RETURN_STRING(LIBINPUT_EVENT_POINTER_TAP); + CASE_RETURN_STRING(LIBINPUT_EVENT_POINTER_MOTION_TOUCHPAD); + CASE_RETURN_STRING(LIBINPUT_EVENT_POINTER_BUTTON_TOUCHPAD); ++ CASE_RETURN_STRING(LIBINPUT_EVENT_POINTER_SCROLL_FINGER_BEGIN); ++ CASE_RETURN_STRING(LIBINPUT_EVENT_POINTER_SCROLL_FINGER_END); CASE_RETURN_STRING(LIBINPUT_EVENT_POINTER_MOTION); CASE_RETURN_STRING(LIBINPUT_EVENT_POINTER_MOTION_ABSOLUTE); CASE_RETURN_STRING(LIBINPUT_EVENT_POINTER_BUTTON); @@ -3782,7 +3811,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c CASE_RETURN_STRING(LIBINPUT_EVENT_POINTER_AXIS); CASE_RETURN_STRING(LIBINPUT_EVENT_POINTER_SCROLL_WHEEL); CASE_RETURN_STRING(LIBINPUT_EVENT_POINTER_SCROLL_FINGER); -@@ -96,6 +104,9 @@ +@@ -96,6 +106,9 @@ CASE_RETURN_STRING(LIBINPUT_EVENT_TOUCH_MOTION); CASE_RETURN_STRING(LIBINPUT_EVENT_TOUCH_CANCEL); CASE_RETURN_STRING(LIBINPUT_EVENT_TOUCH_FRAME); @@ -3792,7 +3821,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c CASE_RETURN_STRING(LIBINPUT_EVENT_TABLET_TOOL_AXIS); CASE_RETURN_STRING(LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY); CASE_RETURN_STRING(LIBINPUT_EVENT_TABLET_TOOL_TIP); -@@ -193,6 +204,10 @@ +@@ -193,6 +206,10 @@ int32_t slot; int32_t seat_slot; struct device_coords point; @@ -3803,7 +3832,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c }; struct libinput_event_gesture { -@@ -202,8 +217,10 @@ +@@ -202,8 +219,10 @@ int cancelled; struct normalized_coords delta; struct normalized_coords delta_unaccel; @@ -3814,7 +3843,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c }; struct libinput_event_tablet_tool { -@@ -217,6 +234,7 @@ +@@ -217,6 +236,7 @@ struct libinput_tablet_tool *tool; enum libinput_tablet_tool_proximity_state proximity_state; enum libinput_tablet_tool_tip_state tip_state; @@ -3822,7 +3851,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c }; struct libinput_event_tablet_pad { -@@ -362,6 +380,7 @@ +@@ -362,6 +382,7 @@ return event->device; } @@ -3830,7 +3859,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c LIBINPUT_EXPORT struct libinput_event_pointer * libinput_event_get_pointer_event(struct libinput_event *event) { -@@ -374,7 +393,10 @@ +@@ -374,7 +395,12 @@ LIBINPUT_EVENT_POINTER_SCROLL_WHEEL, LIBINPUT_EVENT_POINTER_SCROLL_FINGER, LIBINPUT_EVENT_POINTER_SCROLL_CONTINUOUS, @@ -3838,11 +3867,13 @@ diff -Naur old/src/libinput.c new/src/libinput.c + LIBINPUT_EVENT_POINTER_AXIS, + LIBINPUT_EVENT_POINTER_TAP, + LIBINPUT_EVENT_POINTER_MOTION_TOUCHPAD, -+ LIBINPUT_EVENT_POINTER_BUTTON_TOUCHPAD); ++ LIBINPUT_EVENT_POINTER_BUTTON_TOUCHPAD, ++ LIBINPUT_EVENT_POINTER_SCROLL_FINGER_BEGIN, ++ LIBINPUT_EVENT_POINTER_SCROLL_FINGER_END); return (struct libinput_event_pointer *) event; } -@@ -404,6 +426,18 @@ +@@ -404,6 +430,18 @@ return (struct libinput_event_touch *) event; } @@ -3861,7 +3892,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c LIBINPUT_EXPORT struct libinput_event_gesture * libinput_event_get_gesture_event(struct libinput_event *event) { -@@ -417,7 +451,10 @@ +@@ -417,7 +455,10 @@ LIBINPUT_EVENT_GESTURE_PINCH_UPDATE, LIBINPUT_EVENT_GESTURE_PINCH_END, LIBINPUT_EVENT_GESTURE_HOLD_BEGIN, @@ -3873,7 +3904,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c return (struct libinput_event_gesture *) event; } -@@ -473,6 +510,19 @@ +@@ -473,6 +514,19 @@ return (struct libinput_event_switch *) event; } @@ -3893,7 +3924,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c LIBINPUT_EXPORT uint32_t libinput_event_keyboard_get_time(struct libinput_event_keyboard *event) { -@@ -558,18 +608,29 @@ +@@ -558,18 +612,29 @@ LIBINPUT_EVENT_POINTER_SCROLL_WHEEL, LIBINPUT_EVENT_POINTER_SCROLL_FINGER, LIBINPUT_EVENT_POINTER_SCROLL_CONTINUOUS, @@ -3925,7 +3956,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c return event->delta.x; } -@@ -580,7 +641,8 @@ +@@ -580,7 +645,8 @@ require_event_type(libinput_event_get_context(&event->base), event->base.type, 0, @@ -3935,7 +3966,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c return event->delta.y; } -@@ -592,7 +654,8 @@ +@@ -592,7 +658,8 @@ require_event_type(libinput_event_get_context(&event->base), event->base.type, 0, @@ -3945,7 +3976,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c return event->delta_raw.x; } -@@ -604,7 +667,8 @@ +@@ -604,7 +671,8 @@ require_event_type(libinput_event_get_context(&event->base), event->base.type, 0, @@ -3955,7 +3986,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c return event->delta_raw.y; } -@@ -671,7 +735,9 @@ +@@ -671,7 +739,9 @@ require_event_type(libinput_event_get_context(&event->base), event->base.type, 0, @@ -3966,7 +3997,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c return event->button; } -@@ -682,7 +748,9 @@ +@@ -682,7 +752,9 @@ require_event_type(libinput_event_get_context(&event->base), event->base.type, 0, @@ -3977,7 +4008,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c return event->state; } -@@ -694,11 +762,28 @@ +@@ -694,11 +766,28 @@ require_event_type(libinput_event_get_context(&event->base), event->base.type, 0, @@ -4007,7 +4038,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c LIBINPUT_EXPORT int libinput_event_pointer_has_axis(struct libinput_event_pointer *event, enum libinput_pointer_axis axis) -@@ -930,6 +1015,20 @@ +@@ -930,6 +1019,20 @@ } LIBINPUT_EXPORT double @@ -4028,7 +4059,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c libinput_event_touch_get_y_transformed(struct libinput_event_touch *event, uint32_t height) { -@@ -945,7 +1044,80 @@ +@@ -945,7 +1048,22 @@ } LIBINPUT_EXPORT double @@ -4049,15 +4080,13 @@ diff -Naur old/src/libinput.c new/src/libinput.c +LIBINPUT_EXPORT double +libinput_event_touch_get_tool_x_transformed(struct libinput_event_touch *event, + uint32_t width) -+{ -+ struct evdev_device *device = evdev_device(event->base.device); -+ -+ require_event_type(libinput_event_get_context(&event->base), -+ event->base.type, -+ 0, -+ LIBINPUT_EVENT_TOUCH_DOWN, -+ LIBINPUT_EVENT_TOUCH_MOTION); -+ + { + struct evdev_device *device = evdev_device(event->base.device); + +@@ -955,9 +1073,343 @@ + LIBINPUT_EVENT_TOUCH_DOWN, + LIBINPUT_EVENT_TOUCH_MOTION); + + return evdev_device_transform_x(device, event->tool_rect.x, width); +} + @@ -4107,13 +4136,15 @@ diff -Naur old/src/libinput.c new/src/libinput.c +LIBINPUT_EXPORT double +libinput_event_touch_get_tool_width_transformed(struct libinput_event_touch *event, + uint32_t width) - { - struct evdev_device *device = evdev_device(event->base.device); - -@@ -955,9 +1127,285 @@ - LIBINPUT_EVENT_TOUCH_DOWN, - LIBINPUT_EVENT_TOUCH_MOTION); - ++{ ++ struct evdev_device *device = evdev_device(event->base.device); ++ ++ require_event_type(libinput_event_get_context(&event->base), ++ event->base.type, ++ 0, ++ LIBINPUT_EVENT_TOUCH_DOWN, ++ LIBINPUT_EVENT_TOUCH_MOTION); ++ + return evdev_device_transform_x(device, event->tool_rect.w, width); +} + @@ -4396,7 +4427,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c LIBINPUT_EXPORT uint32_t libinput_event_gesture_get_time(struct libinput_event_gesture *event) { -@@ -1118,6 +1566,44 @@ +@@ -1118,6 +1570,44 @@ } LIBINPUT_EXPORT int @@ -4441,7 +4472,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c libinput_event_tablet_tool_x_has_changed( struct libinput_event_tablet_tool *event) { -@@ -1134,6 +1620,24 @@ +@@ -1134,6 +1624,24 @@ } LIBINPUT_EXPORT int @@ -4466,7 +4497,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c libinput_event_tablet_tool_y_has_changed( struct libinput_event_tablet_tool *event) { -@@ -1892,11 +2396,8 @@ +@@ -1892,11 +2400,8 @@ /* If we fail, we'll fail next time too */ libinput->quirks_initialized = true; @@ -4480,7 +4511,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c quirks = quirks_init_subsystem(data_path, override_file, -@@ -2396,6 +2897,9 @@ +@@ -2396,6 +2901,9 @@ case LIBINPUT_DEVICE_CAP_SWITCH: capability = "CAP_SWITCH"; break; @@ -4490,7 +4521,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c } log_bug_libinput(device->seat->libinput, -@@ -2459,6 +2963,30 @@ +@@ -2459,6 +2967,30 @@ } void @@ -4521,7 +4552,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c pointer_notify_motion_absolute(struct libinput_device *device, uint64_t time, const struct device_coords *point) -@@ -2511,6 +3039,66 @@ +@@ -2511,6 +3043,94 @@ } void @@ -4584,11 +4615,39 @@ diff -Naur old/src/libinput.c new/src/libinput.c + &button_event->base); +} + ++void ++gesture_notify_axis_finger(struct libinput_device *device, ++ uint64_t time, ++ enum libinput_event_type type, ++ uint32_t axes, ++ const struct normalized_coords *delta) ++{ ++ struct libinput_event_pointer *axis_event; ++ const struct discrete_coords zero_discrete = {0}; ++ const struct wheel_v120 zero_v120 = {0}; ++ ++ if (!device_has_cap(device, LIBINPUT_DEVICE_CAP_POINTER)) ++ return; ++ ++ axis_event = zalloc(sizeof *axis_event); ++ ++ *axis_event = (struct libinput_event_pointer) { ++ .time = time, ++ .delta = *delta, ++ .source = LIBINPUT_POINTER_AXIS_SOURCE_FINGER, ++ .axes = axes, ++ .discrete = zero_discrete, ++ .v120 = zero_v120, ++ }; ++ ++ post_device_event(device, time, type, &axis_event->base); ++} ++ +void pointer_notify_axis_finger(struct libinput_device *device, uint64_t time, uint32_t axes, -@@ -2643,7 +3231,11 @@ +@@ -2643,7 +3263,11 @@ uint64_t time, int32_t slot, int32_t seat_slot, @@ -4601,7 +4660,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c { struct libinput_event_touch *touch_event; -@@ -2657,6 +3249,10 @@ +@@ -2657,6 +3281,10 @@ .slot = slot, .seat_slot = seat_slot, .point = *point, @@ -4612,7 +4671,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c }; post_device_event(device, time, -@@ -2669,7 +3265,11 @@ +@@ -2669,7 +3297,11 @@ uint64_t time, int32_t slot, int32_t seat_slot, @@ -4625,7 +4684,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c { struct libinput_event_touch *touch_event; -@@ -2683,6 +3283,10 @@ +@@ -2683,6 +3315,10 @@ .slot = slot, .seat_slot = seat_slot, .point = *point, @@ -4636,7 +4695,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c }; post_device_event(device, time, -@@ -2694,7 +3298,8 @@ +@@ -2694,7 +3330,8 @@ touch_notify_touch_up(struct libinput_device *device, uint64_t time, int32_t slot, @@ -4646,7 +4705,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c { struct libinput_event_touch *touch_event; -@@ -2707,6 +3312,7 @@ +@@ -2707,6 +3344,7 @@ .time = time, .slot = slot, .seat_slot = seat_slot, @@ -4654,7 +4713,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c }; post_device_event(device, time, -@@ -2759,6 +3365,90 @@ +@@ -2759,6 +3397,90 @@ } void @@ -4745,7 +4804,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c tablet_notify_axis(struct libinput_device *device, uint64_t time, struct libinput_tablet_tool *tool, -@@ -2776,6 +3466,7 @@ +@@ -2776,6 +3498,7 @@ .proximity_state = LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_IN, .tip_state = tip_state, .axes = *axes, @@ -4753,7 +4812,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c }; memcpy(axis_event->changed_axes, -@@ -2806,6 +3497,7 @@ +@@ -2806,6 +3529,7 @@ .tip_state = LIBINPUT_TABLET_TOOL_TIP_UP, .proximity_state = proximity_state, .axes = *axes, @@ -4761,7 +4820,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c }; memcpy(proximity_event->changed_axes, changed_axes, -@@ -2835,6 +3527,7 @@ +@@ -2835,6 +3559,7 @@ .tip_state = tip_state, .proximity_state = LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_IN, .axes = *axes, @@ -4769,7 +4828,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c }; memcpy(tip_event->changed_axes, changed_axes, -@@ -2873,6 +3566,7 @@ +@@ -2873,6 +3598,7 @@ .proximity_state = LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_IN, .tip_state = tip_state, .axes = *axes, @@ -4777,7 +4836,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c }; post_device_event(device, -@@ -2999,6 +3693,7 @@ +@@ -2999,6 +3725,7 @@ bool cancelled, const struct normalized_coords *delta, const struct normalized_coords *unaccel, @@ -4785,7 +4844,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c double scale, double angle) { -@@ -3019,6 +3714,48 @@ +@@ -3019,6 +3746,48 @@ .angle = angle, }; @@ -4834,7 +4893,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c post_device_event(device, time, type, &gesture_event->base); } -@@ -3029,13 +3766,28 @@ +@@ -3029,13 +3798,28 @@ enum libinput_event_type type, int finger_count, const struct normalized_coords *delta, @@ -4865,7 +4924,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c gesture_notify_swipe_end(struct libinput_device *device, uint64_t time, int finger_count, -@@ -3044,7 +3796,7 @@ +@@ -3044,7 +3828,7 @@ const struct normalized_coords zero = { 0.0, 0.0 }; gesture_notify(device, time, LIBINPUT_EVENT_GESTURE_SWIPE_END, @@ -4874,7 +4933,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c } void -@@ -3058,7 +3810,7 @@ +@@ -3058,7 +3842,7 @@ double angle) { gesture_notify(device, time, type, finger_count, 0, @@ -4883,7 +4942,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c } void -@@ -3071,7 +3823,7 @@ +@@ -3071,7 +3855,7 @@ const struct normalized_coords zero = { 0.0, 0.0 }; gesture_notify(device, time, LIBINPUT_EVENT_GESTURE_PINCH_END, @@ -4892,7 +4951,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c } void -@@ -3082,7 +3834,7 @@ +@@ -3082,7 +3866,7 @@ const struct normalized_coords zero = { 0.0, 0.0 }; gesture_notify(device, time, LIBINPUT_EVENT_GESTURE_HOLD_BEGIN, @@ -4901,7 +4960,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c } void -@@ -3094,7 +3846,7 @@ +@@ -3094,7 +3878,7 @@ const struct normalized_coords zero = { 0.0, 0.0 }; gesture_notify(device, time, LIBINPUT_EVENT_GESTURE_HOLD_END, @@ -4910,7 +4969,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c } void -@@ -3127,6 +3879,63 @@ +@@ -3127,6 +3911,63 @@ #endif } @@ -4974,7 +5033,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c static void libinput_post_event(struct libinput *libinput, struct libinput_event *event) -@@ -3180,6 +3989,96 @@ +@@ -3180,6 +4021,96 @@ libinput->events_in = (libinput->events_in + 1) % libinput->events_len; } @@ -5071,7 +5130,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c LIBINPUT_EXPORT struct libinput_event * libinput_get_event(struct libinput *libinput) { -@@ -3263,12 +4162,169 @@ +@@ -3263,12 +4194,169 @@ return evdev_device_get_sysname((struct evdev_device *) device); } @@ -5241,7 +5300,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c LIBINPUT_EXPORT unsigned int libinput_device_get_id_product(struct libinput_device *device) { -@@ -3356,6 +4412,15 @@ +@@ -3356,6 +4444,15 @@ } LIBINPUT_EXPORT int @@ -5257,7 +5316,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c libinput_device_switch_has_switch(struct libinput_device *device, enum libinput_switch sw) { -@@ -3537,7 +4602,8 @@ +@@ -3537,7 +4634,8 @@ LIBINPUT_EVENT_POINTER_SCROLL_WHEEL, LIBINPUT_EVENT_POINTER_SCROLL_FINGER, LIBINPUT_EVENT_POINTER_SCROLL_CONTINUOUS, @@ -5267,7 +5326,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c return &event->base; } -@@ -3558,6 +4624,19 @@ +@@ -3558,6 +4656,19 @@ } LIBINPUT_EXPORT struct libinput_event * @@ -5287,7 +5346,7 @@ diff -Naur old/src/libinput.c new/src/libinput.c libinput_event_gesture_get_base_event(struct libinput_event_gesture *event) { require_event_type(libinput_event_get_context(&event->base), -@@ -4764,3 +5843,162 @@ +@@ -4764,3 +5875,162 @@ } } #endif @@ -5552,7 +5611,7 @@ diff -Naur old/src/libinput.h new/src/libinput.h }; /** -@@ -822,6 +893,13 @@ +@@ -822,6 +893,16 @@ */ LIBINPUT_EVENT_POINTER_SCROLL_CONTINUOUS, @@ -5560,13 +5619,16 @@ diff -Naur old/src/libinput.h new/src/libinput.h + LIBINPUT_EVENT_POINTER_MOTION_TOUCHPAD, + LIBINPUT_EVENT_POINTER_BUTTON_TOUCHPAD, + ++ LIBINPUT_EVENT_POINTER_SCROLL_FINGER_BEGIN, ++ LIBINPUT_EVENT_POINTER_SCROLL_FINGER_END, ++ + LIBINPUT_EVENT_JOYSTICK_BUTTON = 450, + LIBINPUT_EVENT_JOYSTICK_AXIS, + LIBINPUT_EVENT_TOUCH_DOWN = 500, LIBINPUT_EVENT_TOUCH_UP, LIBINPUT_EVENT_TOUCH_MOTION, -@@ -832,6 +910,10 @@ +@@ -832,6 +913,10 @@ */ LIBINPUT_EVENT_TOUCH_FRAME, @@ -5577,7 +5639,7 @@ diff -Naur old/src/libinput.h new/src/libinput.h /** * One or more axes have changed state on a device with the @ref * LIBINPUT_DEVICE_CAP_TABLET_TOOL capability. This event is only sent -@@ -1084,6 +1166,19 @@ +@@ -1084,6 +1169,19 @@ /** * @ingroup event * @@ -5597,7 +5659,7 @@ diff -Naur old/src/libinput.h new/src/libinput.h * Return the gesture event that is this input event. If the event type does * not match the gesture event types, this function returns NULL. * -@@ -1486,6 +1581,21 @@ +@@ -1486,6 +1584,21 @@ /** * @ingroup event_pointer * @@ -5619,7 +5681,7 @@ diff -Naur old/src/libinput.h new/src/libinput.h * Check if the event has a valid value for the given axis. * * If this function returns non-zero for an axis and -@@ -1870,6 +1980,120 @@ +@@ -1870,6 +1983,120 @@ uint32_t height); /** @@ -5740,7 +5802,7 @@ diff -Naur old/src/libinput.h new/src/libinput.h * @ingroup event_touch * * @return The generic libinput_event of this event -@@ -1878,6 +2102,228 @@ +@@ -1878,6 +2105,228 @@ libinput_event_touch_get_base_event(struct libinput_event_touch *event); /** @@ -5969,7 +6031,7 @@ diff -Naur old/src/libinput.h new/src/libinput.h * @defgroup event_gesture Gesture events * * Gesture events are generated when a gesture is recognized on a touchpad. -@@ -2090,6 +2536,49 @@ +@@ -2090,6 +2539,49 @@ libinput_event_gesture_get_angle_delta(struct libinput_event_gesture *event); /** @@ -6019,7 +6081,7 @@ diff -Naur old/src/libinput.h new/src/libinput.h * @defgroup event_tablet Tablet events * * Events that come from tools on tablet devices. For events from the pad, -@@ -2817,6 +3306,19 @@ +@@ -2817,6 +3309,19 @@ /** * @ingroup event_tablet * @@ -6039,7 +6101,7 @@ diff -Naur old/src/libinput.h new/src/libinput.h * Return the high-level tool type for a tool object. * * The high level tool describes general interaction expected with the tool. -@@ -3663,6 +4165,56 @@ +@@ -3663,6 +4168,56 @@ int libinput_dispatch(struct libinput *libinput); @@ -6096,7 +6158,7 @@ diff -Naur old/src/libinput.h new/src/libinput.h /** * @ingroup base * -@@ -4133,6 +4685,42 @@ +@@ -4133,6 +4688,42 @@ const char * libinput_device_get_name(struct libinput_device *device); @@ -6139,7 +6201,7 @@ diff -Naur old/src/libinput.h new/src/libinput.h /** * @ingroup device * -@@ -4343,6 +4931,12 @@ +@@ -4343,6 +4934,12 @@ libinput_device_touch_get_touch_count(struct libinput_device *device); /** @@ -6152,7 +6214,7 @@ diff -Naur old/src/libinput.h new/src/libinput.h * @ingroup device * * Check if a @ref LIBINPUT_DEVICE_CAP_SWITCH device has a switch of the -@@ -5722,6 +6316,9 @@ +@@ -5722,6 +6319,9 @@ enum libinput_config_click_method libinput_device_config_click_get_default_method(struct libinput_device *device); @@ -6162,7 +6224,7 @@ diff -Naur old/src/libinput.h new/src/libinput.h /** * @ingroup config */ -@@ -6398,7 +6995,102 @@ +@@ -6398,7 +6998,102 @@ unsigned int libinput_device_config_rotation_get_default_angle(struct libinput_device *device); @@ -6448,7 +6510,21 @@ diff -Naur old/src/libinput-private.h new/src/libinput-private.h void gesture_notify_swipe_end(struct libinput_device *device, -@@ -799,6 +889,17 @@ +@@ -725,6 +815,13 @@ + bool cancelled); + + void ++gesture_notify_axis_finger(struct libinput_device *device, ++ uint64_t time, ++ enum libinput_event_type type, ++ uint32_t axes, ++ const struct normalized_coords *delta); ++ ++void + gesture_notify_hold(struct libinput_device *device, + uint64_t time, + int finger_count); +@@ -799,6 +896,17 @@ enum libinput_switch sw, enum libinput_switch_state state);