aboutsummaryrefslogtreecommitdiff
path: root/src/Output.zig
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2020-05-08 14:51:10 +0200
committerIsaac Freund <ifreund@ifreund.xyz>2020-05-08 14:51:10 +0200
commitac735719cfc086c54ff939786823b29de2c24c0a (patch)
treec8ee87c720b067bbf8a757e8ea098d2b87393141 /src/Output.zig
parent71d580b81173c6e6f93354c6e783972a6aa37b27 (diff)
downloadriver-ac735719cfc086c54ff939786823b29de2c24c0a.tar.gz
river-ac735719cfc086c54ff939786823b29de2c24c0a.tar.xz
Implement initial Xwayland support
Diffstat (limited to 'src/Output.zig')
-rw-r--r--src/Output.zig9
1 files changed, 5 insertions, 4 deletions
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);
}