From 37a0544edf6c53abf7b512e2e2a726017c49bf01 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Sat, 15 Jan 2022 14:24:31 +0000 Subject: [PATCH] backend-wayland: Destroy touch device before seat weston_touch_destroy(), which is called from weston_seat_release(), asserts that all its touch devices have been destroyed. The Wayland backend currently destroys the touch devices ... immediately after calling weston_seat_release(). Invert the ordering so that touch devices are destroyed first and we don't trip over the assert. Signed-off-by: Daniel Stone --- libweston/backend-wayland/wayland.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libweston/backend-wayland/wayland.c b/libweston/backend-wayland/wayland.c index a6d44576..5c3d8e9a 100644 --- a/libweston/backend-wayland/wayland.c +++ b/libweston/backend-wayland/wayland.c @@ -2436,10 +2436,11 @@ display_start_add_seat(struct wayland_backend *b, uint32_t id, uint32_t availabl static void wayland_input_destroy(struct wayland_input *input) { - weston_seat_release(&input->base); - if (input->touch_device) weston_touch_device_destroy(input->touch_device); + + weston_seat_release(&input->base); + if (input->parent.keyboard) { if (input->seat_version >= WL_KEYBOARD_RELEASE_SINCE_VERSION) wl_keyboard_release(input->parent.keyboard);