summaryrefslogtreecommitdiff
path: root/src/sna/sna_damage.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sna/sna_damage.c')
-rw-r--r--src/sna/sna_damage.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/sna/sna_damage.c b/src/sna/sna_damage.c
index ce16b773..745e2d12 100644
--- a/src/sna/sna_damage.c
+++ b/src/sna/sna_damage.c
@@ -1260,8 +1260,13 @@ static int __sna_damage_contains_box(struct sna_damage *damage,
if (!damage->dirty)
return ret;
- if (damage->mode == DAMAGE_ADD && ret == PIXMAN_REGION_IN)
- return ret;
+ if (damage->mode == DAMAGE_ADD) {
+ if (ret == PIXMAN_REGION_IN)
+ return ret;
+ } else {
+ if (ret == PIXMAN_REGION_OUT)
+ return ret;
+ }
__sna_damage_reduce(damage);
return pixman_region_contains_rectangle(&damage->region, (BoxPtr)box);