diff options
author | Tiago Vignatti <tiago.vignatti@intel.com> | 2012-05-07 15:04:58 +0300 |
---|---|---|
committer | Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> | 2012-06-13 15:26:20 +1000 |
commit | 736844ca7b9db8671f91e15dd315ab5db73e8034 (patch) | |
tree | 4598b4101d92f791dc9653f2e79b62e86fe2494f | |
parent | 7602fbdc13ea91ece25cf4235f94a1545d9e4bd9 (diff) |
xwayland: give axis basic support
A remark about the "funny" X server's interface, that has to be called twice
for queuing up events. Anyways, now I got Firefox with scrolling <3
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
-rw-r--r-- | hw/xfree86/xwayland/xwayland-input.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/hw/xfree86/xwayland/xwayland-input.c b/hw/xfree86/xwayland/xwayland-input.c index 759970977..79def3bdb 100644 --- a/hw/xfree86/xwayland/xwayland-input.c +++ b/hw/xfree86/xwayland/xwayland-input.c @@ -394,6 +394,16 @@ static void input_device_handle_axis(void *data, struct wl_input_device *input_device, uint32_t time, uint32_t axis, int32_t value) { + struct xwl_input_device *xwl_input_device = data; + int index; + + if (value == 1) + index = 4; + else if (value == -1) + index = 5; + + xf86PostButtonEvent(xwl_input_device->pointer, TRUE, index, 1, 0, 0); + xf86PostButtonEvent(xwl_input_device->pointer, TRUE, index, 0, 0, 0); } static void |