mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-20 16:10:06 +01:00
gestures: fix acceleration in 3fg drag
Before this patch, tp_filter_motion() was called twice in pointer motion handler during 3fg drag, causing the pointer speed to be much faster than during 1fg motion when the acceleration profile is adaptive. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1180>
This commit is contained in:
parent
e9f3fc080c
commit
cc0889bf2b
1 changed files with 2 additions and 10 deletions
|
|
@ -1718,16 +1718,8 @@ tp_gesture_handle_state_3fg_drag_start(struct tp_dispatch *tp, uint64_t time)
|
|||
static void
|
||||
tp_gesture_handle_state_3fg_drag(struct tp_dispatch *tp, uint64_t time)
|
||||
{
|
||||
if (!(tp->queued & TOUCHPAD_EVENT_MOTION))
|
||||
return;
|
||||
|
||||
struct device_float_coords raw = tp_get_average_touches_delta(tp);
|
||||
struct normalized_coords delta = tp_filter_motion(tp, &raw, time);
|
||||
|
||||
if (!normalized_is_zero(delta) || !device_float_is_zero(raw)) {
|
||||
if (tp->queued & TOUCHPAD_EVENT_MOTION)
|
||||
tp_gesture_post_pointer_motion(tp, time);
|
||||
}
|
||||
if (tp->queued & TOUCHPAD_EVENT_MOTION)
|
||||
tp_gesture_post_pointer_motion(tp, time);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue