mirror of
https://github.com/swaywm/sway.git
synced 2025-11-08 13:29:50 -05:00
find_parent_by_type
This commit is contained in:
parent
84f01a67bd
commit
36e07e9ebc
6 changed files with 112 additions and 71 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue