Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
Output: send river_output_v1.wl_output immediately
This event is not synchronized to the manage sequence and creating a
wl_output global does not cause a manage sequence to be started.
However, this event is currently only sent at the start of manage
sequences. Instead, send it immediately on wl_output global creation if
a corresponding river_output_v1 exists.
river/OutputManager.zig | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/river/OutputManager.zig b/river/OutputManager.zig
index 003d955..d737d1b 100644
--- a/river/OutputManager.zig
+++ b/river/OutputManager.zig
@@ -264,6 +264,13 @@ pub fn commitOutputState(om: *OutputManager) void {
log.err("out of memory", .{});
continue; // Try again next time
};
+ // Adding the output to the layout creates the wl_output global
+ if (!output.sent_wl_output) {
+ if (output.object) |output_v1| {
+ output_v1.sendWlOutput(wlr_output.global.?.getName(output_v1.getClient()));
+ output.sent_wl_output = true;
+ }
+ }
if (server.lock_manager.lockSurfaceFromOutput(output)) |lock_surface| {
lock_surface.tree.node.setPosition(output.sent.x, output.sent.y);
}