diff --git a/build.zig b/build.zig index 1baf9a9..5105227 100644 --- a/build.zig +++ b/build.zig @@ -124,6 +124,7 @@ fn addServerDeps(exe: *std.build.LibExeObjStep) void { exe.linkSystemLibrary("wayland-server"); exe.linkSystemLibrary("wlroots"); exe.linkSystemLibrary("xkbcommon"); + exe.linkSystemLibrary("pixman-1"); } fn addProtocolDeps(exe: *std.build.LibExeObjStep, protocol_step: *std.build.Step) void { diff --git a/river/render.zig b/river/render.zig index 22a58c1..0326580 100644 --- a/river/render.zig +++ b/river/render.zig @@ -124,6 +124,19 @@ pub fn renderOutput(output: *Output) void { // Conclude rendering and swap the buffers, showing the final frame // on-screen. c.wlr_renderer_end(wlr_renderer); + + // TODO(wlroots): remove this with the next release. It is here due to + // a wlroots bug in the screencopy damage implementation + { + var w: c_int = undefined; + var h: c_int = undefined; + c.wlr_output_transformed_resolution(output.wlr_output, &w, &h); + var damage: c.pixman_region32_t = undefined; + c.pixman_region32_init(&damage); + _ = c.pixman_region32_union_rect(&damage, &damage, 0, 0, @intCast(c_uint, w), @intCast(c_uint, h)); + c.wlr_output_set_damage(output.wlr_output, &damage); + } + // TODO: handle failure if (!c.wlr_output_commit(output.wlr_output)) { log.err(.render, "wlr_output_commit failed for {}", .{output.wlr_output.name});