|
|
@ -220,7 +220,7 @@ static void wlr_xwayland_surface_destroy(
|
|
|
|
|
|
|
|
|
|
|
|
if (xsurface->surface) {
|
|
|
|
if (xsurface->surface) {
|
|
|
|
wl_list_remove(&xsurface->surface_destroy.link);
|
|
|
|
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);
|
|
|
|
free(xsurface->title);
|
|
|
@ -515,9 +515,9 @@ static void read_surface_property(struct wlr_xwm *xwm,
|
|
|
|
free(reply);
|
|
|
|
free(reply);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void handle_surface_commit(struct wl_listener *listener, void *data) {
|
|
|
|
static void handle_surface_commit(struct wlr_surface *wlr_surface,
|
|
|
|
struct wlr_xwayland_surface *xsurface =
|
|
|
|
void *role_data) {
|
|
|
|
wl_container_of(listener, xsurface, surface_commit);
|
|
|
|
struct wlr_xwayland_surface *xsurface = role_data;
|
|
|
|
|
|
|
|
|
|
|
|
if (!xsurface->added &&
|
|
|
|
if (!xsurface->added &&
|
|
|
|
wlr_surface_has_buffer(xsurface->surface) &&
|
|
|
|
wlr_surface_has_buffer(xsurface->surface) &&
|
|
|
@ -558,8 +558,8 @@ static void xwm_map_shell_surface(struct wlr_xwm *xwm,
|
|
|
|
read_surface_property(xwm, xsurface, props[i]);
|
|
|
|
read_surface_property(xwm, xsurface, props[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
xsurface->surface_commit.notify = handle_surface_commit;
|
|
|
|
wlr_surface_set_role_committed(xsurface->surface, handle_surface_commit,
|
|
|
|
wl_signal_add(&surface->events.commit, &xsurface->surface_commit);
|
|
|
|
xsurface);
|
|
|
|
|
|
|
|
|
|
|
|
xsurface->surface_destroy.notify = handle_surface_destroy;
|
|
|
|
xsurface->surface_destroy.notify = handle_surface_destroy;
|
|
|
|
wl_signal_add(&surface->events.destroy, &xsurface->surface_destroy);
|
|
|
|
wl_signal_add(&surface->events.destroy, &xsurface->surface_destroy);
|
|
|
@ -690,7 +690,7 @@ static void xwm_handle_unmap_notify(struct wlr_xwm *xwm,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (xsurface->surface) {
|
|
|
|
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);
|
|
|
|
wl_list_remove(&xsurface->surface_destroy.link);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
xsurface->surface = NULL;
|
|
|
|
xsurface->surface = NULL;
|
|
|
|