git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commit276194c980b0150fe8cdd4419871a97d0648d0a7
parent7466412bb1
authorIsaac Freund <[email protected]>
date2024-03-11 19:14
build: require wlroots version 0.17.2

This fixes a crash that users have hit fairly often in the wild using
Xwayland and allows us to remove an ugly workaround for another issue.

 river/Root.zig | 11 -----------
 river/main.zig |  4 ++--
 2 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/river/Root.zig b/river/Root.zig
index 1232b51..d0707c3 100644
--- a/river/Root.zig
+++ b/river/Root.zig
@@ -786,17 +786,6 @@ fn processOutputConfig(
         var proposed_state = wlr.Output.State.init();
         head.state.apply(&proposed_state);
 
-        // Work around a division by zero in the wlroots drm backend.
-        // See https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3791
-        // TODO(wlroots) remove this workaround after 0.17.2 is out.
-        if (output.wlr_output.isDrm() and
-            proposed_state.committed.mode and
-            proposed_state.mode_type == .custom and
-            proposed_state.custom_mode.refresh == 0)
-        {
-            proposed_state.custom_mode.refresh = 60000;
-        }
-
         switch (action) {
             .test_only => {
                 if (!wlr_output.testState(&proposed_state)) success = false;
diff --git a/river/main.zig b/river/main.zig
index f5ccdd0..da59953 100644
--- a/river/main.zig
+++ b/river/main.zig
@@ -31,8 +31,8 @@ const util = @import("util.zig");
 const Server = @import("Server.zig");
 
 comptime {
-    if (wlr.version.major != 0 or wlr.version.minor != 17 or wlr.version.micro < 1) {
-        @compileError("river requires at least wlroots version 0.17.1 due to bugs in wlroots 0.17.0");
+    if (wlr.version.major != 0 or wlr.version.minor != 17 or wlr.version.micro < 2) {
+        @compileError("river requires at least wlroots version 0.17.2 due to bugs in wlroots 0.17.0/0.17.1");
     }
 }