seat: allow tree focus changes while layer focused

This allows the focused inactive tree node and visible workspaces to be
changed while a surface layer has focus. The layer temporarily loses
focus, the tree focus changes, and the layer gets refocused.
This commit is contained in:
Brian Ashworth 2019-02-13 23:46:20 -05:00 committed by emersion
parent cc39bbdff3
commit ab42874f71
2 changed files with 14 additions and 4 deletions

View file

@ -725,6 +725,10 @@ void seat_set_raw_focus(struct sway_seat *seat, struct sway_node *node) {
void seat_set_focus(struct sway_seat *seat, struct sway_node *node) {
if (seat->focused_layer) {
struct wlr_layer_surface_v1 *layer = seat->focused_layer;
seat_set_focus_layer(seat, NULL);
seat_set_focus(seat, node);
seat_set_focus_layer(seat, layer);
return;
}