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 <ofourdan@redhat.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Carlos Garnacho <carlosg@gnome.org>
This commit is contained in:
Olivier Fourdan 2021-10-20 09:25:19 +02:00 committed by Olivier Fourdan
parent e6401e6025
commit 672fe9e244
3 changed files with 9 additions and 8 deletions

View File

@ -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)
{

View File

@ -31,6 +31,7 @@
#include <xwayland-types.h>
#include <xwayland-input.h>
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);

View File

@ -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)
{