diff --git a/output.c b/output.c index 82f024b..f36c229 100644 --- a/output.c +++ b/output.c @@ -391,6 +391,18 @@ output_damage_view_surface(struct cg_output *cg_output, struct cg_view *view) view_for_each_surface(view, damage_surface, &data); } +void +output_damage_view_whole(struct cg_output *cg_output, struct cg_view *view) +{ + struct damage_data data = { + .output = cg_output, + .x = view->x, + .y = view->y, + .whole = true, + }; + view_for_each_surface(view, damage_surface, &data); +} + void output_damage_drag_icon(struct cg_output *cg_output, struct cg_drag_icon *drag_icon) { diff --git a/output.h b/output.h index 645d6b9..d2d3995 100644 --- a/output.h +++ b/output.h @@ -23,6 +23,7 @@ struct cg_output { void handle_new_output(struct wl_listener *listener, void *data); void output_damage_view_surface(struct cg_output *output, struct cg_view *view); +void output_damage_view_whole(struct cg_output *cg_output, struct cg_view *view); void output_damage_drag_icon(struct cg_output *output, struct cg_drag_icon *icon); #endif diff --git a/view.c b/view.c index 0ce366b..9a14f6d 100644 --- a/view.c +++ b/view.c @@ -139,6 +139,12 @@ view_damage_surface(struct cg_view *view) output_damage_view_surface(view->server->output, view); } +void +view_damage_whole(struct cg_view *view) +{ + output_damage_view_whole(view->server->output, view); +} + void view_activate(struct cg_view *view, bool activate) { diff --git a/view.h b/view.h index 4b64c68..03e41ca 100644 --- a/view.h +++ b/view.h @@ -70,6 +70,7 @@ char *view_get_title(struct cg_view *view); bool view_is_primary(struct cg_view *view); bool view_is_transient_for(struct cg_view *child, struct cg_view *parent); void view_damage_surface(struct cg_view *view); +void view_damage_whole(struct cg_view *view); void view_activate(struct cg_view *view, bool activate); void view_position(struct cg_view *view); void view_for_each_surface(struct cg_view *view, wlr_surface_iterator_func_t iterator, void *data);