diff options
author | Drew DeVault <[email protected]> | 2015-08-20 13:22:25 -0400 |
---|---|---|
committer | Drew DeVault <[email protected]> | 2015-08-20 13:22:25 -0400 |
commit | d965ce4a1a100f09d25d54ea32de856e89fcf7bb (patch) | |
tree | e9e2a9d9db46044ab7cd7bd4dcb7ca2650a89f70 /sway/workspace.c | |
parent | 84f01a67bdaef4dbff787caa4b076ed60e257c51 (diff) | |
parent | 36e07e9ebc55b3fc8a8b8cd76ee743202691ad56 (diff) |
Merge pull request #102 from taiyu-len/master
find_parent_by_type
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); } |