diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-08-06 04:21:44 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-08-20 13:27:52 +0900 |
commit | daf766eccd673564c8d804962486a01a3a5895c3 (patch) | |
tree | 75b225f251ac97eaa639bade96a175fbf5d9377a | |
parent | container_replace: copy {width,height}_fraction (diff) | |
download | sway-daf766eccd673564c8d804962486a01a3a5895c3.tar.gz sway-daf766eccd673564c8d804962486a01a3a5895c3.tar.zst sway-daf766eccd673564c8d804962486a01a3a5895c3.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
-rw-r--r-- | sway/tree/workspace.c | 7 |
1 files changed, 7 insertions, 0 deletions
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, | |||
754 | workspace->layout = layout; | 754 | workspace->layout = layout; |
755 | middle->layout = old_layout; | 755 | middle->layout = old_layout; |
756 | 756 | ||
757 | struct sway_seat *seat; | ||
758 | wl_list_for_each(seat, &server.input->seats, link) { | ||
759 | if (seat_get_focus(seat) == &workspace->node) { | ||
760 | seat_set_focus(seat, &middle->node); | ||
761 | } | ||
762 | } | ||
763 | |||
757 | return middle; | 764 | return middle; |
758 | } | 765 | } |
759 | 766 | ||