mirror of
https://github.com/swaywm/sway.git
synced 2025-11-17 06:59:48 -05:00
Damage borders when damaging view
This commit is contained in:
parent
98f7ee8f59
commit
bec80f1551
8 changed files with 40 additions and 26 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue