aboutsummaryrefslogtreecommitdiff
path: root/sway/tree/view.c
diff options
context:
space:
mode:
authorBrian Ashworth <RedSoxFan@users.noreply.github.com>2018-10-13 18:08:23 -0400
committerGitHub <noreply@github.com>2018-10-13 18:08:23 -0400
commit02aeb0f0bec90f87acbdbce41d34109b26e9dc5d (patch)
tree874a3157f2778518a87009c35b47de9d5451b257 /sway/tree/view.c
parent36d9037f2c419756b00d1fe2dbeefca278bc2799 (diff)
parent782a835175b1fecb427fbbafef4e7518af95329f (diff)
Merge branch 'master' into fix_edge_gaps
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r--sway/tree/view.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index e613ac0b..1104af36 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -504,7 +504,16 @@ static struct sway_workspace *select_workspace(struct sway_view *view) {
}
// Use the focused workspace
- return seat_get_focused_workspace(seat);
+ struct sway_node *node = seat_get_focus_inactive(seat, &root->node);
+ if (node && node->type == N_WORKSPACE) {
+ return node->sway_workspace;
+ } else if (node && node->type == N_CONTAINER) {
+ return node->sway_container->workspace;
+ }
+
+ // If there's no focus_inactive workspace then we must be running without
+ // any outputs connected
+ return root->saved_workspaces->items[0];
}
static bool should_focus(struct sway_view *view) {