aboutsummaryrefslogtreecommitdiff
path: root/xwayland
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2017-12-27 13:02:49 +0100
committerGitHub <noreply@github.com>2017-12-27 13:02:49 +0100
commita79dc7df5103854b2cc5be20e153140862cda05a (patch)
treeed4ae380d49ffa3c9111628e4ff5fd6f61c05349 /xwayland
parente80925017134f397e27cf7196e3379b28d93a8fd (diff)
parent5c5f0611c418a39dc39e309679de25775caae030 (diff)
Merge pull request #524 from acrisci/role-committed
[wip] Role committed
Diffstat (limited to 'xwayland')
-rw-r--r--xwayland/xwm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c
index f7ea879d..d9bfaf2e 100644
--- a/xwayland/xwm.c
+++ b/xwayland/xwm.c
@@ -222,7 +222,7 @@ static void wlr_xwayland_surface_destroy(
if (xsurface->surface) {
wl_list_remove(&xsurface->surface_destroy.link);
- wl_list_remove(&xsurface->surface_commit.link);
+ wlr_surface_set_role_committed(xsurface->surface, NULL, NULL);
}
free(xsurface->title);
@@ -517,9 +517,9 @@ static void read_surface_property(struct wlr_xwm *xwm,
free(reply);
}
-static void handle_surface_commit(struct wl_listener *listener, void *data) {
- struct wlr_xwayland_surface *xsurface =
- wl_container_of(listener, xsurface, surface_commit);
+static void handle_surface_commit(struct wlr_surface *wlr_surface,
+ void *role_data) {
+ struct wlr_xwayland_surface *xsurface = role_data;
if (!xsurface->added &&
wlr_surface_has_buffer(xsurface->surface) &&
@@ -560,8 +560,8 @@ static void xwm_map_shell_surface(struct wlr_xwm *xwm,
read_surface_property(xwm, xsurface, props[i]);
}
- xsurface->surface_commit.notify = handle_surface_commit;
- wl_signal_add(&surface->events.commit, &xsurface->surface_commit);
+ wlr_surface_set_role_committed(xsurface->surface, handle_surface_commit,
+ xsurface);
xsurface->surface_destroy.notify = handle_surface_destroy;
wl_signal_add(&surface->events.destroy, &xsurface->surface_destroy);
@@ -692,7 +692,7 @@ static void xwm_handle_unmap_notify(struct wlr_xwm *xwm,
}
if (xsurface->surface) {
- wl_list_remove(&xsurface->surface_commit.link);
+ wlr_surface_set_role_committed(xsurface->surface, NULL, NULL);
wl_list_remove(&xsurface->surface_destroy.link);
}
xsurface->surface = NULL;