[PATCH] xwayland: Clear pending cursor frame callbacks on pointer enter

Jonas Ådahl jadahl at gmail.com
Thu Feb 4 23:54:27 UTC 2016


On Feb 5, 2016 12:53 AM, "Rui Matos" <tiagomatos at gmail.com> wrote:
>
> The last cursor frame we commited before the pointer left one of our
> surfaces might not have been shown. In that case we'll have a cursor
> surface frame callback pending which we need to clear so that we can
> continue submitting new cursor frames.
>
> Signed-off-by: Rui Matos <tiagomatos at gmail.com>
> Reviewed-by: Daniel Stone <daniels at collabora.com>

Reviewed-by: Jonas Ådahl <jadahl at gmail.com>

> ---
>
> v2: as suggested by Jonas, moved the hunk further up to stay close to
>     another related hack we already have and also removed the
>     xwl_seat_set_cursor() call since CheckMotion() will do that too.
>
>     I think Daniel's r-b still stands anyway.
>
>  hw/xwayland/xwayland-input.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
> index 61ca70b..d6cbf32 100644
> --- a/hw/xwayland/xwayland-input.c
> +++ b/hw/xwayland/xwayland-input.c
> @@ -251,6 +251,15 @@ pointer_handle_enter(void *data, struct wl_pointer
*pointer,
>      mipointer = MIPOINTER(master);
>      mipointer->pSpriteCursor = (CursorPtr) 1;
>
> +    /* The last cursor frame we commited before the pointer left one
> +     * of our surfaces might not have been shown. In that case we'll
> +     * have a cursor surface frame callback pending which we need to
> +     * clear so that we can continue submitting new cursor frames. */
> +    if (xwl_seat->cursor_frame_cb) {
> +        wl_callback_destroy(xwl_seat->cursor_frame_cb);
> +        xwl_seat->cursor_frame_cb = NULL;
> +    }
> +
>      CheckMotion(NULL, master);
>
>      /* Ideally, X clients shouldn't see these button releases.  When
> --
> 2.5.0
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20160205/5b61abc2/attachment.html>


More information about the wayland-devel mailing list