diff --git a/river/Root.zig b/river/Root.zig index a3bd35a..0608287 100644 --- a/river/Root.zig +++ b/river/Root.zig @@ -129,6 +129,8 @@ pub fn init(self: *Self) !void { const scene = try wlr.Scene.create(); errdefer scene.tree.node.destroy(); + scene.setLinuxDmabufV1(server.linux_dmabuf); + const interactive_content = try scene.tree.createSceneTree(); const drag_icons = try scene.tree.createSceneTree(); const hidden_tree = try scene.tree.createSceneTree(); diff --git a/river/Server.zig b/river/Server.zig index a2ee934..56bb2ca 100644 --- a/river/Server.zig +++ b/river/Server.zig @@ -51,6 +51,7 @@ backend: *wlr.Backend, session: ?*wlr.Session, renderer: *wlr.Renderer, +linux_dmabuf: *wlr.LinuxDmabufV1, allocator: *wlr.Allocator, xdg_shell: *wlr.XdgShell, @@ -98,7 +99,7 @@ pub fn init(self: *Self) !void { try self.renderer.initWlShm(self.wl_server); if (self.renderer.getDmabufFormats() != null and self.renderer.getDrmFd() >= 0) { - _ = try wlr.LinuxDmabufV1.createWithRenderer(self.wl_server, 4, self.renderer); + self.linux_dmabuf = try wlr.LinuxDmabufV1.createWithRenderer(self.wl_server, 4, self.renderer); } self.allocator = try wlr.Allocator.autocreate(self.backend, self.renderer);