diff options
| author | Isaac Freund <ifreund@ifreund.xyz> | 2020-05-12 00:11:11 +0200 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2020-05-12 00:11:11 +0200 |
| commit | 0eb6c7c11339b8742048219d7bc1538d1e29bc45 (patch) | |
| tree | c3bb618190a6d62c2578fac72535eb99d85c81f1 /src/Server.zig | |
| parent | 5bec8f4fcb361d3c7527d367bc66c0810e3c91d9 (diff) | |
| download | river-0eb6c7c11339b8742048219d7bc1538d1e29bc45.tar.gz river-0eb6c7c11339b8742048219d7bc1538d1e29bc45.tar.xz | |
Only store mapped layer surfaces in Output.layers
Diffstat (limited to 'src/Server.zig')
| -rw-r--r-- | src/Server.zig | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Server.zig b/src/Server.zig index 8639233..b8d1877 100644 --- a/src/Server.zig +++ b/src/Server.zig @@ -25,6 +25,7 @@ const c = @import("c.zig"); const Config = @import("Config.zig"); const DecorationManager = @import("DecorationManager.zig"); const InputManager = @import("InputManager.zig"); +const LayerSurface = @import("LayerSurface.zig"); const Log = @import("log.zig").Log; const Output = @import("Output.zig"); const Root = @import("Root.zig"); @@ -240,8 +241,10 @@ fn handleNewLayerSurface(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) } } + // The layer surface will add itself to the proper list of the output on map const output = @ptrCast(*Output, @alignCast(@alignOf(*Output), wlr_layer_surface.output.*.data)); - output.addLayerSurface(wlr_layer_surface) catch unreachable; + const node = self.allocator.create(std.TailQueue(LayerSurface).Node) catch unreachable; + node.data.init(output, wlr_layer_surface); } fn handleNewXwaylandSurface(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void { |
