aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-09-30 10:03:59 +0200
committerGitHub <noreply@github.com>2018-09-30 10:03:59 +0200
commit4eb3fe4830fe3931c6a608c5ec16f627f2847972 (patch)
treeddf2f811de08756472336e6ee09139db1746ee86 /sway
parenta53171669a709886b0cd887bdefbe9a6ca84b39c (diff)
parent24bcb507ecf9b656fb9d5532dab9d1cac9c84a33 (diff)
Merge pull request #2732 from RyanDwyer/fix-zero-outputs
Fix hotplugging down to zero outputs
Diffstat (limited to 'sway')
-rw-r--r--sway/tree/root.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sway/tree/root.c b/sway/tree/root.c
index d6f67bd7..6748e9c9 100644
--- a/sway/tree/root.c
+++ b/sway/tree/root.c
@@ -273,6 +273,12 @@ void root_for_each_container(void (*f)(struct sway_container *con, void *data),
container_for_each_child(container, f, data);
}
}
+
+ // Saved workspaces
+ for (int i = 0; i < root->saved_workspaces->length; ++i) {
+ struct sway_workspace *ws = root->saved_workspaces->items[i];
+ workspace_for_each_container(ws, f, data);
+ }
}
struct sway_output *root_find_output(
@@ -320,6 +326,15 @@ struct sway_container *root_find_container(
}
}
}
+
+ // Saved workspaces
+ for (int i = 0; i < root->saved_workspaces->length; ++i) {
+ struct sway_workspace *ws = root->saved_workspaces->items[i];
+ if ((result = workspace_find_container(ws, test, data))) {
+ return result;
+ }
+ }
+
return NULL;
}