Skip to content

Commit

Permalink
layer-shell: refocus if keyboard interactive lost
Browse files Browse the repository at this point in the history
When arranging layer-shell layers, verify that the currently focused
layer, if any, for each seat is still keyboard interactive. If the layer
is no longer keyboard interactive and there is not a keyboard
interactive overlay or top layer to change the focus to, refocus the
focus inactive node for the seat.
  • Loading branch information
RedSoxFan authored and emersion committed Dec 27, 2019
1 parent bd42415 commit 088b374
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sway/desktop/layer_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@ void arrange_layers(struct sway_output *output) {
wl_list_for_each(seat, &server.input->seats, link) {
if (topmost != NULL) {
seat_set_focus_layer(seat, topmost->layer_surface);
} else if (seat->focused_layer &&
!seat->focused_layer->current.keyboard_interactive) {
seat_set_focus_layer(seat, NULL);
}
}
}
Expand Down

0 comments on commit 088b374

Please sign in to comment.