render: schedule new frame on output commit failure

This seems to fix issues with rendering freezing described in
https://github.com/ifreund/river/issues/153.
This commit is contained in:
Qiu 2021-03-27 16:17:24 +01:00 committed by GitHub
parent e1048e6add
commit c457b12cf3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -142,9 +142,10 @@ pub fn renderOutput(output: *Output) void {
output.wlr_output.setDamage(&damage); output.wlr_output.setDamage(&damage);
} }
// TODO: handle failure output.wlr_output.commit() catch {
output.wlr_output.commit() catch log.err("output commit failed for {}, retrying", .{std.mem.spanZ(&output.wlr_output.name)});
log.err("output commit failed for {}", .{output.wlr_output.name}); output.wlr_output.scheduleFrame();
};
} }
fn renderFilter(view: *View, filter_tags: u32) bool { fn renderFilter(view: *View, filter_tags: u32) bool {