Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
Support wlr-screencopy
Closes https://github.com/ifreund/river/issues/7
src/c.zig | 1 +
src/server.zig | 2 ++
src/view.zig | 2 +-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/c.zig b/src/c.zig
index d2080d2..a551d8e 100644
--- a/src/c.zig
+++ b/src/c.zig
@@ -17,6 +17,7 @@ pub usingnamespace @cImport({
@cInclude("wlr/types/wlr_output.h");
@cInclude("wlr/types/wlr_output_layout.h");
@cInclude("wlr/types/wlr_pointer.h");
+ @cInclude("wlr/types/wlr_screencopy_v1.h");
@cInclude("wlr/types/wlr_seat.h");
@cInclude("wlr/types/wlr_xcursor_manager.h");
@cInclude("wlr/types/wlr_xdg_decoration_v1.h");
diff --git a/src/server.zig b/src/server.zig
index db00173..1c7fa66 100644
--- a/src/server.zig
+++ b/src/server.zig
@@ -84,6 +84,8 @@ pub const Server = struct {
return error.CantCreateWlrCompositor;
_ = c.wlr_data_device_manager_create(self.wl_display) orelse
return error.CantCreateWlrDataDeviceManager;
+ _ = c.wlr_screencopy_manager_v1_create(self.wl_display) orelse
+ return error.CantCreateWlrScreencopyManager;
_ = c.wlr_xdg_output_manager_v1_create(self.wl_display, self.root.wlr_output_layout) orelse
return error.CantCreateWlrOutputManager;
diff --git a/src/view.zig b/src/view.zig
index 1c60080..7fab391 100644
--- a/src/view.zig
+++ b/src/view.zig
@@ -213,7 +213,7 @@ pub const View = struct {
self.natural_height = @intCast(u32, self.wlr_xdg_surface.surface.*.current.height);
}
- const app_id: ?[*:0]const u8 = self.wlr_xdg_surface.unnamed_165.toplevel.*.app_id;
+ const app_id: ?[*:0]const u8 = self.wlr_xdg_surface.unnamed_166.toplevel.*.app_id;
Log.Debug.log("View with app_id '{}' mapped", .{if (app_id) |id| id else "NULL"});
// Make views with app_ids listed in the float filter float