[PATCH weston 2/8] compositor: do not recompute size on pointer_set_cursor

Jason Ekstrand jason at jlekstrand.net
Thu Nov 28 06:29:46 PST 2013


Pekka and I already talked about this one and I think it's the right thing
to do.
--Jason Ekstrand

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
On Nov 26, 2013 11:20 AM, "Jonny Lamb" <jonny.lamb at collabora.co.uk> wrote:

> From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
>
> This removes the calls to weston_surface_buffer_width/height() from
> input.c, which are the last external calls to them.
>
> Instead, use the cached values from weston_surface::width,height. These
> have already been set by weston_surface_commit(), because that is the
> only way a weston_surface can get a buffer.
> ---
>  src/input.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/input.c b/src/input.c
> index ae0e832..f965ba1 100644
> --- a/src/input.c
> +++ b/src/input.c
> @@ -1495,8 +1495,8 @@ pointer_set_cursor(struct wl_client *client, struct
> wl_resource *resource,
>         pointer->hotspot_y = y;
>
>         if (surface->buffer_ref.buffer)
> -               pointer_cursor_surface_configure(surface, 0, 0,
> weston_surface_buffer_width(surface),
> -
> weston_surface_buffer_height(surface));
> +               pointer_cursor_surface_configure(surface, 0, 0,
> surface->width,
> +
> surface->height);
>  }
>
>  static void
> --
> 1.8.4.2
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20131128/aac4c8b3/attachment.html>


More information about the wayland-devel mailing list