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
This commit is contained in:
Ryan Dwyer 2018-05-25 21:07:59 +10:00
parent 3c77f066a5
commit db38b9bbf3
7 changed files with 79 additions and 83 deletions

View file

@ -216,7 +216,11 @@ void container_update_title_textures(struct sway_container *container);
*/
void container_calculate_title_height(struct sway_container *container);
void container_notify_child_title_changed(struct sway_container *container);
/**
* Notify a container that a tree modification has changed in its children,
* so the container can update its tree representation.
*/
void container_notify_subtree_changed(struct sway_container *container);
/**
* Return the height of a regular title bar.