aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/workspace.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-08-06 04:21:44 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2019-08-14 13:19:16 +0900
commitf36240208c57124a88cdee18fb81fa3fc69e0f0a (patch)
treeea5646d0f39ac2dff3e1117cb3abe844a1959db4 /sway/tree/workspace.c
parentcontainer_replace: copy {width,height}_fraction (diff)
downloadsway-f36240208c57124a88cdee18fb81fa3fc69e0f0a.tar.gz
sway-f36240208c57124a88cdee18fb81fa3fc69e0f0a.tar.zst
sway-f36240208c57124a88cdee18fb81fa3fc69e0f0a.zip
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
Diffstat (limited to 'sway/tree/workspace.c')
-rw-r--r--sway/tree/workspace.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c
index 3ad5de06..5568d1f5 100644
--- a/sway/tree/workspace.c
+++ b/sway/tree/workspace.c
@@ -763,6 +763,13 @@ struct sway_container *workspace_split(struct sway_workspace *workspace,
763 workspace->layout = layout; 763 workspace->layout = layout;
764 middle->layout = old_layout; 764 middle->layout = old_layout;
765 765
766 struct sway_seat *seat;
767 wl_list_for_each(seat, &server.input->seats, link) {
768 if (seat_get_focus(seat) == &workspace->node) {
769 seat_set_focus(seat, &middle->node);
770 }
771 }
772
766 return middle; 773 return middle;
767} 774}
768 775