[PATCH 1/2] compositor: only update cursor sprite position on output repaint

Ander Conselvan de Oliveira conselvan2 at gmail.com
Thu Mar 29 01:52:32 PDT 2012


On 03/29/2012 10:56 AM, Ander Conselvan de Oliveira wrote:
> ---
>   src/compositor.c |   29 +++++++++++++++++++++++------
>   src/compositor.h |    2 ++
>   2 files changed, 25 insertions(+), 6 deletions(-)
>
> diff --git a/src/compositor.c b/src/compositor.c
> index f9e1f23..158acf8 100644
> --- a/src/compositor.c
> +++ b/src/compositor.c

[...]

> @@ -1990,6 +1986,27 @@ weston_input_device_release(struct weston_input_device *device)
>   	wl_input_device_release(&device->input_device);
>   }
>
> +static int
> +device_update_cursor_sprite(struct weston_input_device *device)


Oops, made a mistake when rebasing. This was supposed to be 'static void'.

> +{
> +	int x, y;
> +
> +	x = device->input_device.x - device->hotspot_x;
> +	y = device->input_device.y - device->hotspot_y;
> +
> +	if (device->sprite)
> +		weston_surface_set_position(device->sprite, x, y);
> +}
> +


More information about the wayland-devel mailing list