From daf766eccd673564c8d804962486a01a3a5895c3 Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Tue, 6 Aug 2019 04:21:44 -0400 Subject: 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 --- sway/tree/workspace.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c index 03869d2e..b59c9152 100644 --- a/sway/tree/workspace.c +++ b/sway/tree/workspace.c @@ -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; } -- cgit v1.2.3-54-g00ecf