[PATCH xserver] xwayland: track axis type conversion

Tiago Vignatti tiago.vignatti at intel.com
Fri Jun 1 05:51:53 PDT 2012


Signed-off-by: Tiago Vignatti <tiago.vignatti at intel.com>
---
 hw/xfree86/xwayland/xwayland-input.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/hw/xfree86/xwayland/xwayland-input.c b/hw/xfree86/xwayland/xwayland-input.c
index 734e2c1..12bc4f9 100644
--- a/hw/xfree86/xwayland/xwayland-input.c
+++ b/hw/xfree86/xwayland/xwayland-input.c
@@ -341,14 +341,15 @@ pointer_handle_button(void *data, struct wl_pointer *pointer, uint32_t serial,
 
 static void
 pointer_handle_axis(void *data, struct wl_pointer *pointer,
-		    uint32_t time, uint32_t axis, int32_t value)
+		    uint32_t time, uint32_t axis, wl_fixed_t value)
 {
     struct xwl_seat *xwl_seat = data;
     int index;
+    int val = wl_fixed_to_int(value);
 
-    if (value == 1)
+    if (val == 1)
         index = 4;
-    else if (value == -1)
+    else if (val == -1)
         index = 5;
 
     xf86PostButtonEvent(xwl_seat->pointer, TRUE, index, 1, 0, 0);
-- 
1.7.9.5



More information about the wayland-devel mailing list