aboutsummaryrefslogtreecommitdiff
path: root/rootston/xwayland.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-01-21 14:50:37 +0100
committeremersion <contact@emersion.fr>2018-01-21 14:50:37 +0100
commita636d72fc77ebcaa986fd1b72e85664e2fe586a3 (patch)
treef24b49b187230b93afba4df99c3b8b58fd1b80ad /rootston/xwayland.c
parenteeffe113372686f3b44fdb0c4e86cf8d00ba9c54 (diff)
rootston: track subsurface damage
Diffstat (limited to 'rootston/xwayland.c')
-rw-r--r--rootston/xwayland.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/rootston/xwayland.c b/rootston/xwayland.c
index 81f91b4f..6f9912e6 100644
--- a/rootston/xwayland.c
+++ b/rootston/xwayland.c
@@ -121,7 +121,8 @@ static void handle_destroy(struct wl_listener *listener, void *data) {
if (xwayland_surface->mapped) {
wl_list_remove(&roots_surface->view->link);
}
- view_destroy(roots_surface->view);
+ view_finish(roots_surface->view);
+ free(roots_surface->view);
free(roots_surface);
}
@@ -233,24 +234,26 @@ static void handle_map_notify(struct wl_listener *listener, void *data) {
view->wlr_surface = xsurface->surface;
view->x = xsurface->x;
view->y = xsurface->y;
+ wl_list_insert(&desktop->views, &view->link);
+
view_damage_whole(view);
roots_surface->surface_commit.notify = handle_surface_commit;
wl_signal_add(&xsurface->surface->events.commit,
&roots_surface->surface_commit);
-
- wl_list_insert(&desktop->views, &view->link);
}
static void handle_unmap_notify(struct wl_listener *listener, void *data) {
struct roots_xwayland_surface *roots_surface =
wl_container_of(listener, roots_surface, unmap_notify);
+ struct roots_view *view = roots_surface->view;
- view_damage_whole(roots_surface->view);
-
- roots_surface->view->wlr_surface = NULL;
wl_list_remove(&roots_surface->surface_commit.link);
- wl_list_remove(&roots_surface->view->link);
+
+ view_damage_whole(view);
+
+ view->wlr_surface = NULL;
+ wl_list_remove(&view->link);
}
void handle_xwayland_surface(struct wl_listener *listener, void *data) {