aboutsummaryrefslogtreecommitdiff
path: root/src/layer_surface.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/layer_surface.zig')
-rw-r--r--src/layer_surface.zig10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/layer_surface.zig b/src/layer_surface.zig
index 0ad76c9..650fdb2 100644
--- a/src/layer_surface.zig
+++ b/src/layer_surface.zig
@@ -117,7 +117,17 @@ pub const LayerSurface = struct {
}
}
+ // This gives exclusive focus to a keyboard interactive top or overlay layer
+ // surface if there is one.
layer_surface.output.arrangeLayers();
+
+ // Ensure that focus is given to the appropriate view if there is no
+ // other top/overlay layer surface to grab focus.
+ it = layer_surface.output.root.server.input_manager.seats.first;
+ while (it) |node| : (it = node.next) {
+ const seat = &node.data;
+ seat.focus(null);
+ }
}
fn handleCommit(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void {