aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Orzechowski <orzechowski.alexander@gmail.com>2022-08-25 18:59:33 -0400
committerAlexander Orzechowski <orzechowski.alexander@gmail.com>2022-08-25 19:00:13 -0400
commit525506559a5226302eb8b1100a94ef02e9d4df15 (patch)
treeb8efd8d5800144060a962fab135b16e3fe7a2da6
parentd452a729cb7b81a91086ca2cacb054b19923f4c5 (diff)
wlr_compositor: Use wlr_fbox_equal
-rw-r--r--types/wlr_compositor.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/types/wlr_compositor.c b/types/wlr_compositor.c
index fd7cc1d0..cb026783 100644
--- a/types/wlr_compositor.c
+++ b/types/wlr_compositor.c
@@ -230,10 +230,7 @@ static void surface_update_damage(pixman_region32_t *buffer_damage,
if (pending->width != current->width ||
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) {
+ !wlr_fbox_equal(&pending->viewport.src, &current->viewport.src)) {
// 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);