Support wlr-screencopy

Closes https://github.com/ifreund/river/issues/7
This commit is contained in:
Isaac Freund 2020-04-26 11:08:11 +02:00
parent f133d0b391
commit 609eeae6f4
No known key found for this signature in database
GPG key ID: 86DED400DDFD7A11
3 changed files with 4 additions and 1 deletions

View file

@ -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");

View file

@ -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;

View file

@ -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