]> git.mdlowis.com Git - proto/labwc.git/commitdiff
xwayland: remove dissociate work-around
authorJohan Malm <jgm323@gmail.com>
Mon, 12 Aug 2024 21:07:53 +0000 (22:07 +0100)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Fri, 16 Aug 2024 20:47:08 +0000 (22:47 +0200)
...to cope with pre-wlroots-0.18.0 behaviour resulting in dissociate
events being emitted without a prior associate one.

src/xwayland.c

index b98a02c25b05c3b9801cf0a9dd3c35fc37007c88..c5034ed1e134ef5da2df2125336a3befe6cd710e 100644 (file)
@@ -279,19 +279,8 @@ handle_dissociate(struct wl_listener *listener, void *data)
        struct xwayland_view *xwayland_view =
                wl_container_of(listener, xwayland_view, dissociate);
 
-       if (!xwayland_view->base.mappable.connected) {
-               /*
-                * In some cases wlroots fails to emit the associate event
-                * due to an early return in xwayland_surface_associate().
-                * This is arguably a wlroots bug, but nevertheless it
-                * should not bring down labwc.
-                *
-                * TODO: Potentially remove when starting to track
-                *       wlroots 0.18 and it got fixed upstream.
-                */
-               wlr_log(WLR_ERROR, "dissociate received before associate");
-               return;
-       }
+       /* https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4524 */
+       assert(xwayland_view->base.mappable.connected);
        mappable_disconnect(&xwayland_view->base.mappable);
 }