aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/container.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2020-01-13 21:11:11 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2020-01-14 07:38:57 -0700
commita4e4e21edfc6aed09c0be67c43fa4b1364f647c0 (patch)
treeaf6e336ef794e25daedfbbeaffe9d2825369c53e /sway/tree/container.c
parentDocs: explain why menu command should be passed to sway (diff)
downloadsway-a4e4e21edfc6aed09c0be67c43fa4b1364f647c0.tar.gz
sway-a4e4e21edfc6aed09c0be67c43fa4b1364f647c0.tar.zst
sway-a4e4e21edfc6aed09c0be67c43fa4b1364f647c0.zip
container: add inactive fullscreen to focus stack
When a container was being made fullscreen and it is on the focused workspace for a seat, focus was being set to the container. However, when the container was on a non-focused workspace, the focus stack wasn't being touched. When assigning a fullscreen container to a workspace or moving a fullscreen container to a different workspace, this would make it so the fullscreen container was never added to the focus stack for the workspace thus preventing access to the workspace. This adds the container to the top of the focus stack, behind the container on the focused workspace.
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r--sway/tree/container.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index b89047a7..aa819be7 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -958,6 +958,11 @@ static void container_fullscreen_workspace(struct sway_container *con) {
958 focus_ws = seat_get_focused_workspace(seat); 958 focus_ws = seat_get_focused_workspace(seat);
959 if (focus_ws == con->workspace) { 959 if (focus_ws == con->workspace) {
960 seat_set_focus_container(seat, con); 960 seat_set_focus_container(seat, con);
961 } else {
962 struct sway_node *focus =
963 seat_get_focus_inactive(seat, &root->node);
964 seat_set_raw_focus(seat, &con->node);
965 seat_set_raw_focus(seat, focus);
961 } 966 }
962 } 967 }
963 } 968 }