diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-12-26 19:51:06 -0500 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-12-27 11:38:56 +0100 |
commit | 088b374b1a3e7ead08e1430d3d89649b1cd5a54b (patch) | |
tree | 3ac0b3b3c063fb30cf078304733056502868f04f /sway/desktop/layer_shell.c | |
parent | config/output: apply scale_filter even when scale has not changed (diff) | |
download | sway-088b374b1a3e7ead08e1430d3d89649b1cd5a54b.tar.gz sway-088b374b1a3e7ead08e1430d3d89649b1cd5a54b.tar.zst sway-088b374b1a3e7ead08e1430d3d89649b1cd5a54b.zip |
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.
Diffstat (limited to 'sway/desktop/layer_shell.c')
-rw-r--r-- | sway/desktop/layer_shell.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c index b754b1fa..b6dddff6 100644 --- a/sway/desktop/layer_shell.c +++ b/sway/desktop/layer_shell.c | |||
@@ -215,6 +215,9 @@ void arrange_layers(struct sway_output *output) { | |||
215 | wl_list_for_each(seat, &server.input->seats, link) { | 215 | wl_list_for_each(seat, &server.input->seats, link) { |
216 | if (topmost != NULL) { | 216 | if (topmost != NULL) { |
217 | seat_set_focus_layer(seat, topmost->layer_surface); | 217 | seat_set_focus_layer(seat, topmost->layer_surface); |
218 | } else if (seat->focused_layer && | ||
219 | !seat->focused_layer->current.keyboard_interactive) { | ||
220 | seat_set_focus_layer(seat, NULL); | ||
218 | } | 221 | } |
219 | } | 222 | } |
220 | } | 223 | } |