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 75a7b02529
commit f36240208c

View file

@ -763,6 +763,13 @@ struct sway_container *workspace_split(struct sway_workspace *workspace,
workspace->layout = layout; workspace->layout = layout;
middle->layout = old_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; return middle;
} }