38 lines
1.6 KiB
Diff
38 lines
1.6 KiB
Diff
From 23f2de229ad432308639d5306db902d4f512a988 Mon Sep 17 00:00:00 2001
|
|
From: Konstantin Bytensky <kostya3@gmail.com>
|
|
Date: Mon, 9 Feb 2015 13:50:24 +0200
|
|
Subject: [PATCH] Fix for libinput 0.9
|
|
|
|
---
|
|
libswc/seat.c | 16 ++++++++++++----
|
|
1 file changed, 12 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/libswc/seat.c b/libswc/seat.c
|
|
index d9c70f3..14d46b7 100644
|
|
--- libswc/seat.c
|
|
+++ libswc/seat.c
|
|
@@ -320,12 +320,20 @@ static int handle_libinput_data(int fd, uint32_t mask, void * data)
|
|
{
|
|
struct libinput_event_pointer * event;
|
|
wl_fixed_t amount;
|
|
+ enum libinput_pointer_axis axis;
|
|
|
|
event = libinput_event_get_pointer_event(generic_event);
|
|
- amount = wl_fixed_from_double
|
|
- (libinput_event_pointer_get_axis_value(event));
|
|
- handle_axis(libinput_event_pointer_get_time(event),
|
|
- libinput_event_pointer_get_axis(event), amount);
|
|
+ for (axis = LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL;
|
|
+ axis <= LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL;
|
|
+ ++axis)
|
|
+ {
|
|
+ if (libinput_event_pointer_has_axis(event, axis)) {
|
|
+ amount = wl_fixed_from_double
|
|
+ (libinput_event_pointer_get_axis_value(event, axis));
|
|
+ handle_axis(libinput_event_pointer_get_time(event),
|
|
+ axis, amount);
|
|
+ }
|
|
+ }
|
|
break;
|
|
}
|
|
default:
|