aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaac Freund <mail@isaacfreund.com>2023-12-31 10:53:35 -0600
committerIsaac Freund <mail@isaacfreund.com>2024-01-01 22:52:25 -0600
commita128a574a4c19d0d33337449814b76b95953da68 (patch)
treee3536b55621a4faf25be3335366a078ca6f39dce
parent5f0c9e2ccfb225827ab041d2d43a383aee8899fd (diff)
downloadriver-a128a574a4c19d0d33337449814b76b95953da68.tar.gz
river-a128a574a4c19d0d33337449814b76b95953da68.tar.xz
output-management: work around wlroots crash
m---------deps/zig-wlroots0
-rw-r--r--river/Root.zig11
2 files changed, 11 insertions, 0 deletions
diff --git a/deps/zig-wlroots b/deps/zig-wlroots
-Subproject 96dfdc14e99468f4aa6560c8397cd4d0eb0c282
+Subproject 9901da0c3b1a393248a13cc81bc282cfac8d687
diff --git a/river/Root.zig b/river/Root.zig
index b0c1d8d..a3bd35a 100644
--- a/river/Root.zig
+++ b/river/Root.zig
@@ -770,6 +770,17 @@ 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;