backends/native: Migrate discrete scroll

Change meta_seat_impl_notify_discrete_scroll_in_impl to receive 120
based values and report high-resolution scroll values as smooth scroll.

Notify discrete scroll only when the accumulated value reach 120.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1962>
This commit is contained in:
José Expósito
2021-09-20 19:53:20 +02:00
committed by Marge Bot
parent a1c50194a9
commit 5171e5b795
4 changed files with 86 additions and 17 deletions

View File

@ -699,7 +699,8 @@ notify_discrete_scroll_in_impl (GTask *task)
meta_seat_impl_notify_discrete_scroll_in_impl (seat,
virtual_evdev->impl_state->device,
event->time_us,
discrete_dx, discrete_dy,
discrete_dx * 120.0,
discrete_dy * 120.0,
event->scroll_source);
g_task_return_boolean (task, TRUE);