]> git.mdlowis.com Git - proto/labwc.git/commitdiff
Chase wlroots: Stop using wlr_xwayland_surface event data
authorJohn Lindgren <john@jlindgren.net>
Mon, 17 Jul 2023 06:33:40 +0000 (02:33 -0400)
committerJohn Lindgren <john@jlindgren.net>
Mon, 17 Jul 2023 12:35:46 +0000 (08:35 -0400)
Chases: 27edd024f83892f4af9c5084d47b73f26966aaf1
xwayland: pass NULL as event data

src/xwayland.c

index cd337e24575a7592f420d6af0c797be74196b92e..7bfd33a23d40376a75c5aca4fe1a86f404454ea6 100644 (file)
@@ -201,7 +201,6 @@ handle_destroy(struct wl_listener *listener, void *data)
 {
        struct view *view = wl_container_of(listener, view, destroy);
        struct xwayland_view *xwayland_view = xwayland_view_from_view(view);
-       assert(data && data == xwayland_view->xwayland_surface);
        assert(xwayland_view->xwayland_surface->data == view);
 
        if (view->surface) {
@@ -355,7 +354,6 @@ handle_set_decorations(struct wl_listener *listener, void *data)
        struct xwayland_view *xwayland_view =
                wl_container_of(listener, xwayland_view, set_decorations);
        struct view *view = &xwayland_view->base;
-       assert(data && data == xwayland_view->xwayland_surface);
 
        view_set_decorations(view, want_deco(xwayland_view->xwayland_surface));
 }
@@ -366,8 +364,7 @@ handle_override_redirect(struct wl_listener *listener, void *data)
        struct xwayland_view *xwayland_view =
                wl_container_of(listener, xwayland_view, override_redirect);
        struct view *view = &xwayland_view->base;
-       struct wlr_xwayland_surface *xsurface = data;
-       assert(xsurface && xsurface == xwayland_view->xwayland_surface);
+       struct wlr_xwayland_surface *xsurface = xwayland_view->xwayland_surface;
 
        struct server *server = view->server;
        bool mapped = xsurface->mapped;