diff options
author | Kirill Primak <vyivel@eclair.cafe> | 2023-03-11 13:59:13 +0300 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-06-02 15:54:25 +0000 |
commit | 2d6a09d9f0dd86274edf65271e2a9ffa11b47854 (patch) | |
tree | 22adfa4750a39c0b78e13b566fcf8c4bfce84362 | |
parent | beb820b573fca805b345c6164e0f1a25256c46c4 (diff) |
Revert "xwm: emit new_surface/destroy on associate/dissociate"
Firing new_surface when a wlr_surface is associated to the X11 window is too
late: the X11 client might've sent configure events before that.
This reverts commit 039cca8a51ed0783d45fb7a5215e9ae83e4e02e2.
Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3606
-rw-r--r-- | xwayland/xwm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c index dbca0038..ec99875e 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -206,6 +206,8 @@ 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; } @@ -397,8 +399,6 @@ 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); @@ -417,6 +417,8 @@ 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); } @@ -960,8 +962,6 @@ 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, |