Skip to content

Commit

Permalink
libweston-desktop/xwayland: Actually destroy the view
Browse files Browse the repository at this point in the history
Signed-off-by: Quentin Glidic <[email protected]>
Reviewed-by: Jonas Ådahl <[email protected]>
  • Loading branch information
sardemff7 committed Aug 16, 2016
1 parent f01ecee commit f6636a8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions libweston-desktop/xwayland.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ weston_desktop_xwayland_surface_change_state(struct weston_desktop_xwayland_surf
if (surface->state != state) {
if (surface->state == XWAYLAND) {
weston_desktop_surface_unlink_view(surface->view);
weston_view_destroy(surface->view);
surface->view = NULL;
}

Expand Down Expand Up @@ -149,11 +150,13 @@ 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);
}
Expand Down

0 comments on commit f6636a8

Please sign in to comment.