diff options
author | Rui Matos <tiagomatos@gmail.com> | 2016-02-03 16:14:09 +0100 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2016-02-08 17:09:40 -0500 |
commit | 87d5534f701242d7c23aa20545a6292a0779c89c (patch) | |
tree | dbc27b337aa24d31e51034054bd0cf9bca6f58b4 | |
parent | b7d392931a309d0fe754869efb456ccd0385f3aa (diff) |
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 Matos <tiagomatos@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Jonas Ã…dahl <jadahl@gmail.com>
-rw-r--r-- | hw/xwayland/xwayland-input.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c index 61ca70bac..f9e325516 100644 --- a/hw/xwayland/xwayland-input.c +++ b/hw/xwayland/xwayland-input.c @@ -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 |