aboutsummaryrefslogtreecommitdiff
path: root/xwayland
diff options
context:
space:
mode:
authorKirill Primak <vyivel@eclair.cafe>2023-03-09 11:01:02 +0300
committerIsaac Freund <mail@isaacfreund.com>2023-03-09 18:51:47 +0000
commit039cca8a51ed0783d45fb7a5215e9ae83e4e02e2 (patch)
treec77a8401949526240af6857a45710432fc6eca6c /xwayland
parentad51983b23c0b38790213e0fe75fc76fea019b83 (diff)
xwm: emit new_surface/destroy on associate/dissociate
Diffstat (limited to 'xwayland')
-rw-r--r--xwayland/xwm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c
index 4d40f740..5f857f24 100644
--- a/xwayland/xwm.c
+++ b/xwayland/xwm.c
@@ -206,8 +206,6 @@ static struct wlr_xwayland_surface *xwayland_surface_create(
wl_list_insert(&xwm->surfaces, &surface->link);
- wl_signal_emit_mutable(&xwm->xwayland->events.new_surface, surface);
-
return surface;
}
@@ -391,6 +389,8 @@ static void xwayland_surface_dissociate(struct wlr_xwayland_surface *xsurface) {
xwayland_surface_set_mapped(xsurface, false);
if (xsurface->surface != NULL) {
+ wl_signal_emit_mutable(&xsurface->events.destroy, xsurface);
+
wl_list_remove(&xsurface->surface_commit.link);
wl_list_remove(&xsurface->surface_precommit.link);
wlr_addon_finish(&xsurface->surface_addon);
@@ -409,8 +409,6 @@ static void xwayland_surface_dissociate(struct wlr_xwayland_surface *xsurface) {
static void xwayland_surface_destroy(struct wlr_xwayland_surface *xsurface) {
xwayland_surface_dissociate(xsurface);
- wl_signal_emit_mutable(&xsurface->events.destroy, xsurface);
-
if (xsurface == xsurface->xwm->focus_surface) {
xwm_surface_activate(xsurface->xwm, NULL);
}
@@ -954,6 +952,8 @@ static void xwayland_surface_associate(struct wlr_xwm *xwm,
if (xwm->xres) {
read_surface_client_id(xwm, xsurface);
}
+
+ wl_signal_emit_mutable(&xwm->xwayland->events.new_surface, xsurface);
}
static void xwm_handle_create_notify(struct wlr_xwm *xwm,