Blob Blame History Raw
From c86222d4bd94892f3bf3c5947c19793ca18bd9e2 Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <>
Date: Wed, 22 May 2019 17:51:04 +0200
Subject: [PATCH xserver] xwayland: Reset scheduled frames after hiding tablet

Hiding the tablet tool cursor results in it being hidden forever after.
This is due to the stale frame callback that will neither be disposed
or replaced. This can be reproduced in krita (X11) as the pointer
cursor is hidden while over the canvas.

Clearing the frame callback ensures the correct behavior in future
xwl_tablet_tool_set_cursor() calls (i.e. a new cursor surface being
displayed, and a new frame callback created), and is 1:1
with xwl_seat_set_cursor() for pointers.

Signed-off-by: Carlos Garnacho <>
(cherry picked from commit dea4a74621294391ce5901bb3339e1b8e7151efc)
 hw/xwayland/xwayland-cursor.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/xwayland/xwayland-cursor.c b/hw/xwayland/xwayland-cursor.c
index cf8395f1d..66720bcc0 100644
--- a/hw/xwayland/xwayland-cursor.c
+++ b/hw/xwayland/xwayland-cursor.c
@@ -188,6 +188,8 @@ xwl_tablet_tool_set_cursor(struct xwl_tablet_tool *xwl_tablet_tool)
                                       NULL, 0, 0);
+        clear_cursor_frame_callback(xwl_cursor);
+        xwl_cursor->needs_update = FALSE;