workspace_split: focus middle if workspace focused

In workspace_split, the middle container that wraps the workspace's
children should be focused for any seat that is focusing the workspace
This commit is contained in:
Brian Ashworth 2019-08-06 04:21:44 -04:00 committed by Drew DeVault
parent 2e757e13a9
commit daf766eccd

View file

@ -754,6 +754,13 @@ struct sway_container *workspace_split(struct sway_workspace *workspace,
workspace->layout = layout;
middle->layout = old_layout;
struct sway_seat *seat;
wl_list_for_each(seat, &server.input->seats, link) {
if (seat_get_focus(seat) == &workspace->node) {
seat_set_focus(seat, &middle->node);
}
}
return middle;
}