From 80ced04f684fafbbcbcd25f1359d9a41a33f7b68 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Wed, 3 Jan 2024 17:18:59 -0600 Subject: [PATCH] river: drop support for wl_drm wl_drm is a legacy interface superseded by the linux-dmabuf protocol. All clients should migrate. This commit drops support for the protocol which should help find whatever problematic clients are left in the wild. If it turns out that this is too soon we can easily keep supporting wl_drm for a little while longer as wlroots has not yet dropped support for it. --- deps/zig-wlroots | 2 +- river/Server.zig | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/deps/zig-wlroots b/deps/zig-wlroots index 13fdf6c..0644a40 160000 --- a/deps/zig-wlroots +++ b/deps/zig-wlroots @@ -1 +1 @@ -Subproject commit 13fdf6c0677d50db501fcb8bacfc6ae0a27ee9eb +Subproject commit 0644a408625e6d1f7d0631f43b95c6f38a595c7c diff --git a/river/Server.zig b/river/Server.zig index aa77e4b..a2ee934 100644 --- a/river/Server.zig +++ b/river/Server.zig @@ -94,7 +94,12 @@ pub fn init(self: *Self) !void { self.renderer = try wlr.Renderer.autocreate(self.backend); errdefer self.renderer.destroy(); - try self.renderer.initServer(self.wl_server); + + 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.allocator = try wlr.Allocator.autocreate(self.backend, self.renderer); errdefer self.allocator.destroy();