aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2020-04-26 11:08:11 +0200
committerIsaac Freund <ifreund@ifreund.xyz>2020-04-26 11:08:56 +0200
commit609eeae6f446247f2cc3219d65b25647de828cb3 (patch)
tree64d7839c002e50a159dbf8e01085f72ca3e545b5
parentf133d0b391b93df6ef90e5f6db51ee36ec47c938 (diff)
downloadriver-609eeae6f446247f2cc3219d65b25647de828cb3.tar.gz
river-609eeae6f446247f2cc3219d65b25647de828cb3.tar.xz
Support wlr-screencopy
Closes https://github.com/ifreund/river/issues/7
-rw-r--r--src/c.zig1
-rw-r--r--src/server.zig2
-rw-r--r--src/view.zig2
3 files changed, 4 insertions, 1 deletions
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