]> git.mdlowis.com Git - proto/labwc.git/commit
xwayland: associate/dissociate/map/unmap cleanups
authorJohn Lindgren <john@jlindgren.net>
Mon, 24 Nov 2025 16:27:19 +0000 (11:27 -0500)
committerJohn Lindgren <john@jlindgren.net>
Thu, 27 Nov 2025 06:26:55 +0000 (01:26 -0500)
commitb9da216bde915e08278a4184f2bd33875a55f468
tree0d818aacd43256d0efce6e13eefb800fc03d591c
parent4b0903cfa9c40f323227a74640dddec03d2672ba
xwayland: associate/dissociate/map/unmap cleanups

- connect/disconnect map handlers in set_surface()
- call set_surface() at time of associate/dissociate

This separates the concepts of "associate" and "map" more clearly.

It's no longer necessary to listen for wlr_surface "destroy" event,
because dissociate is always received first.

Also, view->content_tree is now destroyed and set to NULL at unmap.
Previously, we relied on wlr_scene to destroy it automatically when
the surface was destroyed, but kept a potentially dangling pointer in
view->content_tree until next map. Similar change for unmanaged.

v2: comment updates
include/view.h
src/xwayland-unmanaged.c
src/xwayland.c