SceneNodeData: allow access from wlr_surfaces

This replaces the old View.fromWlrSurface function and is more general.

This commit also moves the xdg activation request_activate listener to
Server as it has no reason to be in View.
This commit is contained in:
Isaac Freund
2023-03-04 22:41:35 +01:00
parent ea4e589fdc
commit 44004e2d28
11 changed files with 80 additions and 53 deletions

View File

@ -60,6 +60,8 @@ pub fn create(wlr_layer_surface: *wlr.LayerSurfaceV1) error{OutOfMemory}!void {
try SceneNodeData.attach(&layer_surface.scene_layer_surface.tree.node, .{ .layer_surface = layer_surface });
try SceneNodeData.attach(&layer_surface.popup_tree.node, .{ .layer_surface = layer_surface });
wlr_layer_surface.surface.data = @ptrToInt(&layer_surface.scene_layer_surface.tree.node);
wlr_layer_surface.events.destroy.add(&layer_surface.destroy);
wlr_layer_surface.events.map.add(&layer_surface.map);
wlr_layer_surface.events.unmap.add(&layer_surface.unmap);