[PATCH xwayland 2/3] xwayland: give axis basic support
Kristian Høgsberg
hoegsberg at gmail.com
Mon May 7 07:04:31 PDT 2012
On Mon, May 07, 2012 at 03:04:58PM +0300, Tiago Vignatti wrote:
> 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
Looks good. The axis approach that Daniel describes sounds better,
but I've pulled this one for now.
Kristian
> 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
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list