diff options
author | Kirill Primak <vyivel@eclair.cafe> | 2022-01-22 11:35:22 +0300 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2022-01-22 12:09:48 +0300 |
commit | da2491d4163e1d8e627d00c8ae594c7f8003472e (patch) | |
tree | 71b78f7ab6fd9c8e3d88bb71cfa4dae7c9efe885 | |
parent | 1d1b84541015d7b2914bdc69013f2a04548f4321 (diff) |
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.
-rw-r--r-- | types/wlr_compositor.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/types/wlr_compositor.c b/types/wlr_compositor.c index e7b922a5..bb4275ef 100644 --- a/types/wlr_compositor.c +++ b/types/wlr_compositor.c @@ -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 { |