aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/desktop/output.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index d7d3fc07..54b9f294 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -473,6 +473,17 @@ void output_damage_box(struct sway_output *output, struct wlr_box *_box) {
473 wlr_output_damage_add_box(output->damage, &box); 473 wlr_output_damage_add_box(output->damage, &box);
474} 474}
475 475
476static void damage_child_views_iterator(struct sway_container *con,
477 void *data) {
478 if (!con->view || !view_is_visible(con->view)) {
479 return;
480 }
481 struct sway_output *output = data;
482 bool whole = true;
483 output_view_for_each_surface(output, con->view, damage_surface_iterator,
484 &whole);
485}
486
476void output_damage_whole_container(struct sway_output *output, 487void output_damage_whole_container(struct sway_output *output,
477 struct sway_container *con) { 488 struct sway_container *con) {
478 // Pad the box by 1px, because the width is a double and might be a fraction 489 // Pad the box by 1px, because the width is a double and might be a fraction
@@ -484,6 +495,12 @@ void output_damage_whole_container(struct sway_output *output,
484 }; 495 };
485 scale_box(&box, output->wlr_output->scale); 496 scale_box(&box, output->wlr_output->scale);
486 wlr_output_damage_add_box(output->damage, &box); 497 wlr_output_damage_add_box(output->damage, &box);
498 // Damage subsurfaces as well, which may extend outside the box
499 if (con->view) {
500 damage_child_views_iterator(con, output);
501 } else {
502 container_for_each_child(con, damage_child_views_iterator, output);
503 }
487} 504}
488 505
489static void damage_handle_destroy(struct wl_listener *listener, void *data) { 506static void damage_handle_destroy(struct wl_listener *listener, void *data) {