diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-11-21 07:55:36 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-11-21 07:55:36 -0500 |
commit | e786d17f632377b6875c812d67165bcddb0a4826 (patch) | |
tree | f447fedce70e3b97778990726fc99b73c58fe885 /rootston | |
parent | 444257b6b17935be5dff11791e9ac9d52cf811b7 (diff) | |
parent | 6bde8dd56beebc429445196d7d4a120677289317 (diff) |
Merge branch 'master' into feature/xwm-selection
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/desktop.c | 3 | ||||
-rw-r--r-- | rootston/wl_shell.c | 2 | ||||
-rw-r--r-- | rootston/xdg_shell_v6.c | 2 | ||||
-rw-r--r-- | rootston/xwayland.c | 6 |
4 files changed, 10 insertions, 3 deletions
diff --git a/rootston/desktop.c b/rootston/desktop.c index cf5a8cdc..65730807 100644 --- a/rootston/desktop.c +++ b/rootston/desktop.c @@ -181,15 +181,12 @@ bool view_center(struct roots_view *view) { void view_destroy(struct roots_view *view) { wl_signal_emit(&view->events.destroy, view); - wl_list_remove(&view->link); free(view); } void view_init(struct roots_view *view, struct roots_desktop *desktop) { view->desktop = desktop; wl_signal_init(&view->events.destroy); - - wl_list_insert(&desktop->views, &view->link); } void view_setup(struct roots_view *view) { 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); diff --git a/rootston/xdg_shell_v6.c b/rootston/xdg_shell_v6.c index 656231c7..ea19753b 100644 --- a/rootston/xdg_shell_v6.c +++ b/rootston/xdg_shell_v6.c @@ -165,6 +165,7 @@ static void handle_destroy(struct wl_listener *listener, void *data) { wl_list_remove(&roots_xdg_surface->destroy.link); wl_list_remove(&roots_xdg_surface->request_move.link); wl_list_remove(&roots_xdg_surface->request_resize.link); + wl_list_remove(&roots_xdg_surface->view->link); view_destroy(roots_xdg_surface->view); free(roots_xdg_surface); } @@ -220,6 +221,7 @@ void handle_xdg_shell_v6_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); } diff --git a/rootston/xwayland.c b/rootston/xwayland.c index c92c424b..dfa602b1 100644 --- a/rootston/xwayland.c +++ b/rootston/xwayland.c @@ -95,6 +95,8 @@ static void maximize(struct roots_view *view, bool maximized) { static void handle_destroy(struct wl_listener *listener, void *data) { struct roots_xwayland_surface *roots_surface = wl_container_of(listener, roots_surface, destroy); + struct wlr_xwayland_surface *xwayland_surface = + roots_surface->view->xwayland_surface; wl_list_remove(&roots_surface->destroy.link); wl_list_remove(&roots_surface->request_configure.link); wl_list_remove(&roots_surface->request_move.link); @@ -102,6 +104,9 @@ static void handle_destroy(struct wl_listener *listener, void *data) { wl_list_remove(&roots_surface->request_maximize.link); wl_list_remove(&roots_surface->map_notify.link); wl_list_remove(&roots_surface->unmap_notify.link); + if (xwayland_surface->mapped) { + wl_list_remove(&roots_surface->view->link); + } view_destroy(roots_surface->view); free(roots_surface); } @@ -243,6 +248,7 @@ void handle_xwayland_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); if (!surface->override_redirect) { view_setup(view); |