From 672fe9e2442fce3f99030aa0beb5c417b4d24d99 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Wed, 20 Oct 2021 09:25:19 +0200 Subject: [PATCH] xwayland: Move xwl_cursor_release() to xwayland-cursor.c It just make more sense to keep xwl_cursor_release() with the rest of the cursor code. No functional change. Signed-off-by: Olivier Fourdan Reviewed-by: Simon Ser Reviewed-by: Carlos Garnacho --- hw/xwayland/xwayland-cursor.c | 8 ++++++++ hw/xwayland/xwayland-cursor.h | 1 + hw/xwayland/xwayland-input.c | 8 -------- 3 files changed, 9 insertions(+), 8 deletions(-) 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) {