aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-07-10 17:32:48 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-07-10 17:32:48 +0000
commit1c13061f35b2d826bee931dee2a00d911173a946 (patch)
tree0597f7aafd9bb304012dbdd71273b14960396432
parentwayland: seat: instantiate pointer surface in capabilities event (diff)
wayland: destroy cursor theme when removing pointer capability
-rw-r--r--wayland.c4
1 files changed, 4 insertions, 0 deletions
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;
}
}