libweston-desktop/xwayland: Do not over-destroy the view

With this weston_view_destroy() call, Xwayland popups make Weston freeze
in a busy-loop (probably corrupted wl_list).

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
This commit is contained in:
Quentin Glidic 2016-08-18 16:45:30 +02:00
parent 5c611d933f
commit 1714f01e0c
No known key found for this signature in database
GPG key ID: AC203F96E2C34BB7

View file

@ -152,13 +152,11 @@ weston_desktop_xwayland_surface_destroy(struct weston_desktop_surface *dsurface,
wl_list_remove(&surface->resource_destroy_listener.link);
weston_desktop_surface_unset_relative_to(surface->surface);
if (surface->added) {
if (surface->added)
weston_desktop_api_surface_removed(surface->desktop,
surface->surface);
} else if (surface->state == XWAYLAND) {
else if (surface->state == XWAYLAND)
weston_desktop_surface_unlink_view(surface->view);
weston_view_destroy(surface->view);
}
free(surface);
}