Commit 87d5534f authored by Rui Tiago Matos's avatar Rui Tiago Matos Committed by Adam Jackson

xwayland: Clear pending cursor frame callbacks on pointer enter

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 Tiago Matos's avatarRui Matos <tiagomatos@gmail.com>
Reviewed-by: default avatarBryce Harrington <bryce@osg.samsung.com>
Acked-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
Reviewed-by: Jonas Ådahl's avatarJonas Ådahl <jadahl@gmail.com>
parent b7d39293
......@@ -267,6 +267,16 @@ pointer_handle_enter(void *data, struct wl_pointer *pointer,
for (i = 0; i < dev->button->numButtons; i++)
if (BitIsOn(dev->button->down, i))
QueuePointerEvents(dev, ButtonRelease, i, 0, &mask);
/* 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;
xwl_seat_set_cursor(xwl_seat);
}
}
static void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment