mirror of
https://github.com/brl/mutter.git
synced 2025-04-12 21:29:38 +00:00
backends/native: Migrate continuous scroll
In order to get the delta X/Y value of the LIBINPUT_EVENT_POINTER_SCROLL_FINGER or LIBINPUT_EVENT_POINTER_SCROLL_CONTINUOUS events the new function libinput_event_pointer_get_scroll_value should be used instead of libinput_event_pointer_get_axis_value. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1962>
This commit is contained in:
parent
5d884d49b5
commit
a1c50194a9
@ -1895,7 +1895,7 @@ notify_continuous_axis (MetaSeatImpl *seat_impl,
|
|||||||
if (libinput_event_pointer_has_axis (axis_event,
|
if (libinput_event_pointer_has_axis (axis_event,
|
||||||
LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL))
|
LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL))
|
||||||
{
|
{
|
||||||
dx = libinput_event_pointer_get_axis_value (
|
dx = libinput_event_pointer_get_scroll_value (
|
||||||
axis_event, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL);
|
axis_event, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL);
|
||||||
|
|
||||||
if (fabs (dx) < DBL_EPSILON)
|
if (fabs (dx) < DBL_EPSILON)
|
||||||
@ -1904,7 +1904,7 @@ notify_continuous_axis (MetaSeatImpl *seat_impl,
|
|||||||
if (libinput_event_pointer_has_axis (axis_event,
|
if (libinput_event_pointer_has_axis (axis_event,
|
||||||
LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL))
|
LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL))
|
||||||
{
|
{
|
||||||
dy = libinput_event_pointer_get_axis_value (
|
dy = libinput_event_pointer_get_scroll_value (
|
||||||
axis_event, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL);
|
axis_event, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL);
|
||||||
|
|
||||||
if (fabs (dy) < DBL_EPSILON)
|
if (fabs (dy) < DBL_EPSILON)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user