From b2f172e91b2d75b0b2af02621ab302afce3a94d6 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Mon, 11 May 2020 13:46:29 +0200 Subject: Implement xwayland unmanaged windows --- src/Root.zig | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/Root.zig') diff --git a/src/Root.zig b/src/Root.zig index 8483969..f87d7ae 100644 --- a/src/Root.zig +++ b/src/Root.zig @@ -18,6 +18,7 @@ const Self = @This(); const std = @import("std"); +const build_options = @import("build_options"); const c = @import("c.zig"); @@ -26,6 +27,7 @@ const Output = @import("Output.zig"); const Server = @import("Server.zig"); const View = @import("View.zig"); const ViewStack = @import("view_stack.zig").ViewStack; +const XwaylandUnmanaged = @import("XwaylandUnmanaged.zig"); /// Responsible for all windowing operations server: *Server, @@ -37,6 +39,10 @@ outputs: std.TailQueue(Output), /// It is not advertised to clients. noop_output: Output, +/// This list stores all unmanaged Xwayland windows. This needs to be in root +/// since X is like the wild west and who knows where these things will go. +xwayland_unmanaged_views: if (build_options.xwayland) std.TailQueue(XwaylandUnmanaged) else void, + /// Number of pending configures sent in the current transaction. /// A value of 0 means there is no current transaction. pending_configures: u32, @@ -59,6 +65,10 @@ pub fn init(self: *Self, server: *Server) !void { return error.CantAddNoopOutput; try self.noop_output.init(self, noop_wlr_output); + if (build_options.xwayland) { + self.xwayland_unmanaged_views = std.TailQueue(XwaylandUnmanaged).init(); + } + self.pending_configures = 0; self.transaction_timer = null; -- cgit v1.2.3