mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-04 20:55:58 +01:00
wlr_damage_ring_set_bounds: Ignore duplicate size requests
This commit is contained in:
parent
3896b6b107
commit
4391845910
2 changed files with 10 additions and 5 deletions
|
@ -1218,6 +1218,7 @@ static void scene_output_update_geometry(struct wlr_scene_output *scene_output)
|
|||
int width, height;
|
||||
wlr_output_transformed_resolution(scene_output->output, &width, &height);
|
||||
wlr_damage_ring_set_bounds(&scene_output->damage_ring, width, height);
|
||||
wlr_damage_ring_add_whole(&scene_output->damage_ring);
|
||||
wlr_output_schedule_frame(scene_output->output);
|
||||
|
||||
scene_node_output_update(&scene_output->scene->tree.node,
|
||||
|
|
|
@ -29,12 +29,16 @@ void wlr_damage_ring_finish(struct wlr_damage_ring *ring) {
|
|||
void wlr_damage_ring_set_bounds(struct wlr_damage_ring *ring,
|
||||
int32_t width, int32_t height) {
|
||||
if (width == 0 || height == 0) {
|
||||
ring->width = INT_MAX;
|
||||
ring->height = INT_MAX;
|
||||
} else {
|
||||
ring->width = width;
|
||||
ring->height = height;
|
||||
width = INT_MAX;
|
||||
height = INT_MAX;
|
||||
}
|
||||
|
||||
if (ring->width == width && ring->height == height) {
|
||||
return;
|
||||
}
|
||||
|
||||
ring->width = width;
|
||||
ring->height = height;
|
||||
wlr_damage_ring_add_whole(ring);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue