From 6a06c3d9073507168df370f9f58642ce2eae1825 Mon Sep 17 00:00:00 2001 From: emersion Date: Mon, 20 Nov 2017 18:05:24 +0100 Subject: Fix segfault when closing xwayland views --- rootston/wl_shell.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'rootston/wl_shell.c') diff --git a/rootston/wl_shell.c b/rootston/wl_shell.c index 7359c878..d0f5989b 100644 --- a/rootston/wl_shell.c +++ b/rootston/wl_shell.c @@ -83,6 +83,7 @@ static void handle_destroy(struct wl_listener *listener, void *data) { wl_list_remove(&roots_surface->request_set_maximized.link); wl_list_remove(&roots_surface->set_state.link); wl_list_remove(&roots_surface->surface_commit.link); + wl_list_remove(&roots_surface->view->link); view_destroy(roots_surface->view); free(roots_surface); } @@ -131,6 +132,7 @@ void handle_wl_shell_surface(struct wl_listener *listener, void *data) { view->close = close; roots_surface->view = view; view_init(view, desktop); + wl_list_insert(&desktop->views, &view->link); view_setup(view); -- cgit v1.2.3