mirror of
https://github.com/swaywm/sway.git
synced 2024-11-10 20:44:01 +01:00
layer-shell: refocus if keyboard interactive lost
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.
This commit is contained in:
parent
bd42415b5d
commit
088b374b1a
@ -215,6 +215,9 @@ void arrange_layers(struct sway_output *output) {
|
|||||||
wl_list_for_each(seat, &server.input->seats, link) {
|
wl_list_for_each(seat, &server.input->seats, link) {
|
||||||
if (topmost != NULL) {
|
if (topmost != NULL) {
|
||||||
seat_set_focus_layer(seat, topmost->layer_surface);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user