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>
This commit is contained in:
@@ -2436,10 +2436,11 @@ display_start_add_seat(struct wayland_backend *b, uint32_t id, uint32_t availabl
|
|||||||
static void
|
static void
|
||||||
wayland_input_destroy(struct wayland_input *input)
|
wayland_input_destroy(struct wayland_input *input)
|
||||||
{
|
{
|
||||||
weston_seat_release(&input->base);
|
|
||||||
|
|
||||||
if (input->touch_device)
|
if (input->touch_device)
|
||||||
weston_touch_device_destroy(input->touch_device);
|
weston_touch_device_destroy(input->touch_device);
|
||||||
|
|
||||||
|
weston_seat_release(&input->base);
|
||||||
|
|
||||||
if (input->parent.keyboard) {
|
if (input->parent.keyboard) {
|
||||||
if (input->seat_version >= WL_KEYBOARD_RELEASE_SINCE_VERSION)
|
if (input->seat_version >= WL_KEYBOARD_RELEASE_SINCE_VERSION)
|
||||||
wl_keyboard_release(input->parent.keyboard);
|
wl_keyboard_release(input->parent.keyboard);
|
||||||
|
|||||||
Reference in New Issue
Block a user