aboutsummaryrefslogtreecommitdiff
path: root/sway/tree/layout.c
diff options
context:
space:
mode:
authorRyan Dwyer <ryandwyer1@gmail.com>2018-05-25 21:07:59 +1000
committerRyan Dwyer <ryandwyer1@gmail.com>2018-05-25 21:07:59 +1000
commitdb38b9bbf3cce4083c538209a7ce5ef1a1cf5f3f (patch)
tree3ee9f0c2bf76907b2854bf6ba2be8ab124b74fb9 /sway/tree/layout.c
parent3c77f066a532efd3df0f2072d02fa4353b4a4511 (diff)
Clean up container title functions
* Add and use lenient_strcat and lenient_strncat functions * Rename `concatenate_child_titles` function as that's no longer what it does * Rename `container_notify_child_title_changed` because we only need to notify that the tree structure has changed, not titles * Don't notify parents when a child changes its title * Update ancestor titles when changing a container's layout * Eg. create nested tabs and change the inner container to stacking * No need to store tree presentation in both container->name and formatted_title
Diffstat (limited to 'sway/tree/layout.c')
-rw-r--r--sway/tree/layout.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sway/tree/layout.c b/sway/tree/layout.c
index 91759f7b..edc24deb 100644
--- a/sway/tree/layout.c
+++ b/sway/tree/layout.c
@@ -149,7 +149,7 @@ struct sway_container *container_remove_child(struct sway_container *child) {
}
}
child->parent = NULL;
- container_notify_child_title_changed(parent);
+ container_notify_subtree_changed(parent);
return parent;
}
@@ -184,8 +184,8 @@ void container_move_to(struct sway_container *container,
container_sort_workspaces(new_parent);
seat_set_focus(seat, new_parent);
}
- container_notify_child_title_changed(old_parent);
- container_notify_child_title_changed(new_parent);
+ container_notify_subtree_changed(old_parent);
+ container_notify_subtree_changed(new_parent);
if (old_parent) {
if (old_parent->type == C_OUTPUT) {
arrange_output(old_parent);
@@ -497,8 +497,8 @@ void container_move(struct sway_container *container,
}
}
- container_notify_child_title_changed(old_parent);
- container_notify_child_title_changed(container->parent);
+ container_notify_subtree_changed(old_parent);
+ container_notify_subtree_changed(container->parent);
if (old_parent) {
seat_set_focus(config->handler_context.seat, old_parent);
@@ -847,7 +847,7 @@ struct sway_container *container_split(struct sway_container *child,
container_add_child(cont, child);
}
- container_notify_child_title_changed(cont);
+ container_notify_subtree_changed(cont);
return cont;
}