aboutsummaryrefslogtreecommitdiff
path: root/src/Output.zig
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2020-05-12 00:11:11 +0200
committerIsaac Freund <ifreund@ifreund.xyz>2020-05-12 00:11:11 +0200
commit0eb6c7c11339b8742048219d7bc1538d1e29bc45 (patch)
treec3bb618190a6d62c2578fac72535eb99d85c81f1 /src/Output.zig
parent5bec8f4fcb361d3c7527d367bc66c0810e3c91d9 (diff)
downloadriver-0eb6c7c11339b8742048219d7bc1538d1e29bc45.tar.gz
river-0eb6c7c11339b8742048219d7bc1538d1e29bc45.tar.xz
Only store mapped layer surfaces in Output.layers
Diffstat (limited to 'src/Output.zig')
-rw-r--r--src/Output.zig16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/Output.zig b/src/Output.zig
index c2315bc..7668928 100644
--- a/src/Output.zig
+++ b/src/Output.zig
@@ -147,15 +147,6 @@ pub fn getRenderer(self: Self) *c.wlr_renderer {
return c.river_wlr_backend_get_renderer(self.wlr_output.backend);
}
-/// Add a newly created layer surface to the output.
-pub fn addLayerSurface(self: *Self, wlr_layer_surface: *c.wlr_layer_surface_v1) !void {
- const layer = wlr_layer_surface.client_pending.layer;
- const node = try self.layers[@intCast(usize, @enumToInt(layer))].allocateNode(self.root.server.allocator);
- node.data.init(self, wlr_layer_surface, layer);
- self.layers[@intCast(usize, @enumToInt(layer))].append(node);
- self.arrangeLayers();
-}
-
/// Arrange all views on the output for the current layout. Modifies only
/// pending state, the changes are not appplied until a transaction is started
/// and completed.
@@ -312,10 +303,7 @@ pub fn arrangeLayers(self: *Self) void {
var it = self.layers[layer].last;
while (it) |node| : (it = node.prev) {
const layer_surface = &node.data;
- // Only mapped surfaces may gain focus
- if (layer_surface.mapped and
- layer_surface.wlr_layer_surface.current.keyboard_interactive)
- {
+ if (layer_surface.wlr_layer_surface.current.keyboard_interactive) {
break :outer layer_surface;
}
}
@@ -360,7 +348,7 @@ fn arrangeLayer(
// If the value of exclusive_zone is greater than zero, then it exclusivly
// occupies some area of the screen.
- if (!layer_surface.mapped or exclusive != (current_state.exclusive_zone > 0)) {
+ if (exclusive != (current_state.exclusive_zone > 0)) {
continue;
}