From 1c13061f35b2d826bee931dee2a00d911173a946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Fri, 10 Jul 2020 19:32:48 +0200 Subject: [PATCH] wayland: destroy cursor theme when removing pointer capability --- wayland.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wayland.c b/wayland.c index 9a6df83b..1320fc3a 100644 --- a/wayland.c +++ b/wayland.c @@ -192,8 +192,12 @@ seat_handle_capabilities(void *data, struct wl_seat *wl_seat, wl_pointer_release(seat->wl_pointer); wl_surface_destroy(seat->pointer.surface); + if (seat->pointer.theme != NULL) + wl_cursor_theme_destroy(seat->pointer.theme); + seat->wl_pointer = NULL; seat->pointer.surface = NULL; + seat->pointer.theme = NULL; seat->pointer.cursor = NULL; } }