From 5e367e178b6bfe7870fbe5231ac2b044a37f7bcf Mon Sep 17 00:00:00 2001
From: Rob Bradford <rob@linux.intel.com>
Date: Mon, 14 May 2012 17:17:46 +0100
Subject: [PATCH] Ecore_wayland: Support vertical/horizontal scrolling

Set the direction on the event based on the axis (horizontal/vertical) and the
z value based on the negative of the value from the compositor.

This results in scrolling that is consistent with the X11 implementation
---
 src/lib/ecore_wayland/ecore_wl_input.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/lib/ecore_wayland/ecore_wl_input.c b/src/lib/ecore_wayland/ecore_wl_input.c
index a0c6bab..1627bc1 100644
--- a/src/lib/ecore_wayland/ecore_wl_input.c
+++ b/src/lib/ecore_wayland/ecore_wl_input.c
@@ -848,12 +848,13 @@ _ecore_wl_input_mouse_wheel_send(Ecore_Wl_Input *input, unsigned int axis, int v
 
    if (axis == WL_INPUT_DEVICE_AXIS_VERTICAL_SCROLL)
      {
-        ev->direction = value;
-        ev->z = 1;
+        ev->direction = 0;
+        ev->z = -value;
      }
    else if (axis == WL_INPUT_DEVICE_AXIS_HORIZONTAL_SCROLL)
      {
-        /* TODO: handle horizontal scroll */
+        ev->direction = 1;
+        ev->z = -value;
      }
 
    if (input->grab)
-- 
1.7.7.6

