From ac735719cfc086c54ff939786823b29de2c24c0a Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Fri, 8 May 2020 14:51:10 +0200 Subject: Implement initial Xwayland support --- src/Output.zig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/Output.zig') diff --git a/src/Output.zig b/src/Output.zig index a7921f0..a0ee749 100644 --- a/src/Output.zig +++ b/src/Output.zig @@ -144,10 +144,11 @@ pub fn deinit(self: *Self) void { } /// Add a new view to the output. arrangeViews() will be called by the view -/// when it is mapped. -pub fn addView(self: *Self, wlr_xdg_surface: *c.wlr_xdg_surface) void { - const node = self.root.server.allocator.create(ViewStack(View).Node) catch unreachable; - node.view.init_xdg_toplevel(self, self.current_focused_tags, wlr_xdg_surface); +/// when it is mapped. The surface argument must be a c.wlr_xdg_surface or +/// c.wlr_xwayland_surface (if xwayland is enabled) +pub fn addView(self: *Self, surface: var) !void { + const node = try self.root.server.allocator.create(ViewStack(View).Node); + node.view.init(self, self.current_focused_tags, surface); self.views.push(node); } -- cgit v1.2.3