[PATCH xwayland 2/3] xwayland: give axis basic support
Tiago Vignatti
tiago.vignatti at intel.com
Mon May 7 05:04:58 PDT 2012
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 at intel.com>
---
hw/xfree86/xwayland/xwayland-input.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/hw/xfree86/xwayland/xwayland-input.c b/hw/xfree86/xwayland/xwayland-input.c
index 7599709..79def3b 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
--
1.7.9.5
More information about the wayland-devel
mailing list