diff options
Diffstat (limited to 'sway/workspace.c')
-rw-r--r-- | sway/workspace.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sway/workspace.c b/sway/workspace.c index 0f44d3b0..d436da8e 100644 --- a/sway/workspace.c +++ b/sway/workspace.c @@ -75,9 +75,7 @@ char *workspace_next_name(void) { swayc_t *workspace_create(const char* name) { swayc_t *parent = get_focused_container(&root_container); - while (parent->type != C_OUTPUT) { - parent = parent->parent; - } + parent = swayc_parent_by_type(parent, C_OUTPUT); return new_workspace(parent, name); } |