From 0c627918bb1d4c056744157b8c37fb1f62c5ca8e Mon Sep 17 00:00:00 2001 From: emersion Date: Fri, 6 Apr 2018 15:59:50 -0400 Subject: Damage all surfaces when damaging whole container --- sway/desktop/output.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'sway') diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 0f25cff1..db2928fd 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -401,6 +401,17 @@ void output_damage_view(struct sway_output *output, struct sway_view *view, damage_surface_iterator, &data); } +static void output_damage_whole_container_iterator(struct sway_container *con, + void *data) { + struct sway_output *output = data; + + if (!sway_assert(con->type != C_VIEW, "expected a view")) { + return; + } + + output_damage_view(output, con->sway_view, true); +} + void output_damage_whole_container(struct sway_output *output, struct sway_container *con) { float scale = output->wlr_output->scale; @@ -411,6 +422,9 @@ void output_damage_whole_container(struct sway_output *output, .height = con->height * scale, }; wlr_output_damage_add_box(output->damage, &box); + + container_descendants(con, C_VIEW, output_damage_whole_container_iterator, + output); } static void damage_handle_destroy(struct wl_listener *listener, void *data) { -- cgit v1.2.3