summaryrefslogtreecommitdiff
path: root/sway/tree/container.c
diff options
context:
space:
mode:
authorDrew DeVault <[email protected]>2018-05-10 18:46:14 -0400
committerGitHub <[email protected]>2018-05-10 18:46:14 -0400
commitfbddd34b47fd774631d2a5495e4b0b69acb34688 (patch)
tree7b74a17124cb1d8a0adf777b9cb337574bea52a7 /sway/tree/container.c
parent3bab37858a2e85982aef3588064325405618c8e7 (diff)
parent44fcc06efd1a3d4bc37141c723c6654f60d8f923 (diff)
Merge pull request #1923 from emersion/full-damage-tracking
Implement full damage tracking
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r--sway/tree/container.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index 38db29c2..db02c69c 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -547,12 +547,13 @@ bool container_has_child(struct sway_container *con,
return container_find(con, find_child_func, child);
}
-void container_damage_whole(struct sway_container *con) {
- struct sway_container *output = con;
- if (output->type != C_OUTPUT) {
- output = container_parent(output, C_OUTPUT);
+void container_damage_whole(struct sway_container *container) {
+ for (int i = 0; i < root_container.children->length; ++i) {
+ struct sway_container *cont = root_container.children->items[i];
+ if (cont->type == C_OUTPUT) {
+ output_damage_whole_container(cont->sway_output, container);
+ }
}
- output_damage_whole_container(output->sway_output, con);
}
static void update_title_texture(struct sway_container *con,
@@ -620,6 +621,7 @@ void container_update_title_textures(struct sway_container *container) {
&config->border_colors.unfocused);
update_title_texture(container, &container->title_urgent,
&config->border_colors.urgent);
+ container_damage_whole(container);
}
void container_calculate_title_height(struct sway_container *container) {