Implement wlr-input-inhibitor

This commit is contained in:
Isaac Freund
2020-04-19 00:59:07 +02:00
parent cd9d4ee395
commit c959a426b7
5 changed files with 135 additions and 56 deletions

View File

@ -277,12 +277,13 @@ pub const Output = struct {
if (topmost_surface) |to_focus| {
// If we found a surface that requires focus, grab the focus of all
// seats.
seat.focusLayer(to_focus);
seat.setFocusRaw(.{ .layer = to_focus });
} else if (seat.focused_layer) |current_focus| {
// If the seat is currently focusing a layer without keyboard
// interactivity, clear the focused layer.
if (!current_focus.wlr_layer_surface.current.keyboard_interactive) {
seat.focusLayer(null);
seat.setFocusRaw(.{ .none = {} });
seat.focus(null);
}
}
}