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 <daniels@collabora.com>
dev
Daniel Stone 3 years ago
parent 2c1ed289e6
commit 37a0544edf
  1. 5
      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);

Loading…
Cancel
Save