diff --git a/hw/xwayland/xwayland-cursor.c b/hw/xwayland/xwayland-cursor.c index be9fa3b28..27b090442 100644 --- a/hw/xwayland/xwayland-cursor.c +++ b/hw/xwayland/xwayland-cursor.c @@ -264,6 +264,14 @@ xwl_tablet_tool_set_cursor(struct xwl_tablet_tool *xwl_tablet_tool) xwl_cursor_attach_pixmap(xwl_seat, xwl_cursor, pixmap); } +void +xwl_cursor_release(struct xwl_cursor *xwl_cursor) +{ + wl_surface_destroy(xwl_cursor->surface); + if (xwl_cursor->frame_cb) + wl_callback_destroy(xwl_cursor->frame_cb); +} + static void xwl_seat_update_all_cursors(struct xwl_seat *xwl_seat) { diff --git a/hw/xwayland/xwayland-cursor.h b/hw/xwayland/xwayland-cursor.h index 401e814a7..a48ef16e4 100644 --- a/hw/xwayland/xwayland-cursor.h +++ b/hw/xwayland/xwayland-cursor.h @@ -31,6 +31,7 @@ #include #include +void xwl_cursor_release(struct xwl_cursor *xwl_cursor); void xwl_tablet_tool_set_cursor(struct xwl_tablet_tool *tool); void xwl_seat_set_cursor(struct xwl_seat *xwl_seat); Bool xwl_screen_init_cursor(struct xwl_screen *xwl_screen); diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c index 80000ea9e..3b3378e98 100644 --- a/hw/xwayland/xwayland-input.c +++ b/hw/xwayland/xwayland-input.c @@ -1448,14 +1448,6 @@ xwl_cursor_init(struct xwl_cursor *xwl_cursor, struct xwl_screen *xwl_screen, xwl_cursor->needs_update = FALSE; } -static void -xwl_cursor_release(struct xwl_cursor *xwl_cursor) -{ - wl_surface_destroy(xwl_cursor->surface); - if (xwl_cursor->frame_cb) - wl_callback_destroy(xwl_cursor->frame_cb); -} - static void xwl_seat_update_cursor(struct xwl_cursor *xwl_cursor) {