summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Ashworth <bosrsf04@gmail.com>2020-01-13 21:11:11 -0500
committerSimon Ser <contact@emersion.fr>2020-01-15 18:02:01 +0100
commit764a270920d918df0bb64e6bde253cc0421a0fef (patch)
treea98e9ec5a267ddfb790f3feab6cc4caafffebe7e
parentd8030ec5c289eff35865584eb9c7964eeb2399dd (diff)
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.
-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 b89047a72..aa819be78 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -958,6 +958,11 @@ static void container_fullscreen_workspace(struct sway_container *con) {
focus_ws = seat_get_focused_workspace(seat);
if (focus_ws == con->workspace) {
seat_set_focus_container(seat, con);
+ } else {
+ struct sway_node *focus =
+ seat_get_focus_inactive(seat, &root->node);
+ seat_set_raw_focus(seat, &con->node);
+ seat_set_raw_focus(seat, focus);
}
}
}