[PATCH weston] evdev: Convert wl_fixed_t to int before using internally

Kristian Høgsberg hoegsberg at gmail.com
Wed May 9 08:36:35 PDT 2012


On Wed, May 09, 2012 at 08:46:44AM +0200, Jonas Ådahl wrote:
> Signed-off-by: Jonas Ådahl <jadahl at gmail.com>

Thanks, that fixes the immediate problem.  I think we want to switch
to wl_fixed_t in notify_motion() though, so we'll probably rewrite
this again shortly.

Kristian

> ---
>  src/evdev.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/evdev.c b/src/evdev.c
> index c65b82f..5fa7ae6 100644
> --- a/src/evdev.c
> +++ b/src/evdev.c
> @@ -300,8 +300,8 @@ evdev_flush_motion(struct evdev_input_device *device, uint32_t time)
>  
>  	if (device->type & EVDEV_RELATIVE_MOTION) {
>  		notify_motion(master, time,
> -			      master->x + device->rel.dx,
> -			      master->y + device->rel.dy);
> +			      wl_fixed_to_int(master->x) + device->rel.dx,
> +			      wl_fixed_to_int(master->y) + device->rel.dy);
>  		device->type &= ~EVDEV_RELATIVE_MOTION;
>  		device->rel.dx = 0;
>  		device->rel.dy = 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