aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop/output.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r--sway/desktop/output.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index 47461736..907ad6c9 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -784,8 +784,8 @@ void output_damage_surface(struct sway_output *output, double ox, double oy,
damage_surface_iterator, &data);
}
-void output_damage_view(struct sway_output *output, struct sway_view *view,
- bool whole) {
+static void output_damage_view(struct sway_output *output,
+ struct sway_view *view, bool whole) {
if (!sway_assert(view->swayc != NULL, "expected a view in the tree")) {
return;
}
@@ -805,6 +805,11 @@ void output_damage_view(struct sway_output *output, struct sway_view *view,
damage_surface_iterator, &data);
}
+void output_damage_from_view(struct sway_output *output,
+ struct sway_view *view) {
+ output_damage_view(output, view, false);
+}
+
static void output_damage_whole_container_iterator(struct sway_container *con,
void *data) {
struct sway_output *output = data;
@@ -827,8 +832,12 @@ void output_damage_whole_container(struct sway_output *output,
};
wlr_output_damage_add_box(output->damage, &box);
- container_descendants(con, C_VIEW, output_damage_whole_container_iterator,
- output);
+ if (con->type == C_VIEW) {
+ output_damage_whole_container_iterator(con, output);
+ } else {
+ container_descendants(con, C_VIEW,
+ output_damage_whole_container_iterator, output);
+ }
}
static void damage_handle_destroy(struct wl_listener *listener, void *data) {