[PATCH xserver] xwayland: track axis type conversion
Kristian Høgsberg
hoegsberg at gmail.com
Fri Jun 1 08:16:01 PDT 2012
On Fri, Jun 01, 2012 at 03:51:53PM +0300, Tiago Vignatti wrote:
> Signed-off-by: Tiago Vignatti <tiago.vignatti at intel.com>
> ---
> hw/xfree86/xwayland/xwayland-input.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
Ah, yup, thanks,
Kristian
> 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
>
> _______________________________________________
> 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