diff options
author | Dominique Martinet <asmadeus@codewreck.org> | 2017-08-23 23:39:16 +0200 |
---|---|---|
committer | Dominique Martinet <asmadeus@codewreck.org> | 2017-08-24 07:51:24 +0200 |
commit | 4a288fdacbfec518b1caa3b413b869cd389d54d4 (patch) | |
tree | 1060a12bdf86eaedb990f9b74a51dcfce296e7e3 /xwayland | |
parent | e3143b50b6363bb7408e30aa64acdbdcd9b249d9 (diff) |
xwm: free x11 windows on finish
Diffstat (limited to 'xwayland')
-rw-r--r-- | xwayland/xwayland.c | 3 | ||||
-rw-r--r-- | xwayland/xwm.c | 10 |
2 files changed, 10 insertions, 3 deletions
diff --git a/xwayland/xwayland.c b/xwayland/xwayland.c index 9ac94e72..f30b18d0 100644 --- a/xwayland/xwayland.c +++ b/xwayland/xwayland.c @@ -134,9 +134,6 @@ static void wlr_xwayland_finish(struct wlr_xwayland *wlr_xwayland) { wl_event_source_remove(wlr_xwayland->sigusr1_source); } - // TODO: destroy all these windows, for now just cleanup - wl_list_init(&wlr_xwayland->displayable_windows); - xwm_destroy(wlr_xwayland->xwm); safe_close(wlr_xwayland->x_fd[0]); diff --git a/xwayland/xwm.c b/xwayland/xwm.c index 3cd5b22b..3fa6cb98 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -310,6 +310,16 @@ void xwm_destroy(struct wlr_xwm *xwm) { if (xwm->event_source) { wl_event_source_remove(xwm->event_source); } + struct wlr_x11_window *window, *tmp; + wl_list_for_each_safe(window, tmp, &xwm->xwayland->displayable_windows, link) { + wlr_x11_window_destroy(window); + } + wl_list_for_each_safe(window, tmp, &xwm->new_windows, link) { + wlr_x11_window_destroy(window); + } + wl_list_for_each_safe(window, tmp, &xwm->unpaired_windows, link) { + wlr_x11_window_destroy(window); + } wl_list_remove(&xwm->surface_create_listener.link); xcb_disconnect(xwm->xcb_conn); |