[PATCH weston 4/5] Make use of new wl_cursors

Rob Bradford rob at robster.org.uk
Tue Jul 24 04:01:28 PDT 2012


On 23 July 2012 19:55, Daniel Stone <daniel at fooishbar.org> wrote:
> Port the existing manual (and somewhat fragile) cursor-handling code to
> the new wl_cursor interface.

>  4 files changed, 183 insertions(+), 251 deletions(-)
>
> diff --git a/clients/window.c b/clients/window.c
> index 93299e1..2a7010a 100644
> --- a/clients/window.c
> +++ b/clients/window.c
> @@ -2372,12 +2372,12 @@ input_set_pointer_image_index(struct input *input, int index)
>         if (!buffer)
>                 return;
>
> -       wl_pointer_set_cursor(input->pointer, input->display->serial,
> -                             input->pointer_surface,
> -                             image->hotspot_x, image->hotspot_y);
>         wl_surface_attach(input->pointer_surface, buffer, 0, 0);
>         wl_surface_damage(input->pointer_surface, 0, 0,
>                           image->width, image->height);
> +       wl_pointer_set_cursor(input->pointer, input->display->serial,
> +                             input->pointer_surface,
> +                             image->hotspot_x, image->hotspot_y);
>  }
>

Is this switch in order important ? In all the toolkits i've copied
the old ordering of set_cursor, attach, damage in. Should those be
changed?

Cheers,

Rob


More information about the wayland-devel mailing list