mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-22 18:09:49 +01:00
compositor: damage the whole buffer on viewport src change
wp_viewporter protocol doesn't seem to say anything about damage, but Firefox assumes that wp_viewport::set_source alone is enough to damage the whole surface, and that assumption kinda makes sense, so let's do that.
This commit is contained in:
parent
1d1b845410
commit
da2491d416
1 changed files with 6 additions and 2 deletions
|
@ -208,8 +208,12 @@ static void surface_update_damage(pixman_region32_t *buffer_damage,
|
|||
pixman_region32_clear(buffer_damage);
|
||||
|
||||
if (pending->width != current->width ||
|
||||
pending->height != current->height) {
|
||||
// Damage the whole buffer on resize
|
||||
pending->height != current->height ||
|
||||
pending->viewport.src.x != current->viewport.src.x ||
|
||||
pending->viewport.src.y != current->viewport.src.y ||
|
||||
pending->viewport.src.width != current->viewport.src.width ||
|
||||
pending->viewport.src.height != current->viewport.src.height) {
|
||||
// Damage the whole buffer on resize or viewport source box change
|
||||
pixman_region32_union_rect(buffer_damage, buffer_damage, 0, 0,
|
||||
pending->buffer_width, pending->buffer_height);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue