summaryrefslogtreecommitdiff
path: root/hw/xwayland/xwayland-cursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xwayland/xwayland-cursor.c')
-rw-r--r--hw/xwayland/xwayland-cursor.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/xwayland/xwayland-cursor.c b/hw/xwayland/xwayland-cursor.c
index b2ae93ff9..0c1cd34ca 100644
--- a/hw/xwayland/xwayland-cursor.c
+++ b/hw/xwayland/xwayland-cursor.c
@@ -169,12 +169,19 @@ xwl_set_cursor(DeviceIntPtr device,
ScreenPtr screen, CursorPtr cursor, int x, int y)
{
struct xwl_seat *xwl_seat;
+ Bool cursor_visibility_changed;
xwl_seat = device->public.devicePrivate;
if (xwl_seat == NULL)
return;
+ cursor_visibility_changed = !!xwl_seat->x_cursor ^ !!cursor;
+
xwl_seat->x_cursor = cursor;
+
+ if (cursor_visibility_changed)
+ xwl_seat_cursor_visibility_changed(xwl_seat);
+
xwl_seat_set_cursor(xwl_seat);
}