aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-04-22 17:52:10 -0400
committerDavid Robillard <d@drobilla.net>2022-04-23 21:19:19 -0400
commit7feb9000f640d9d6f05f5d0f80a2177db920af49 (patch)
tree9ca372760d6d76a46b71da7b7ce49e7ecd3c8388
parent68d837a98dd1fb5ff4df28bbda501ab2ad1b4ee8 (diff)
downloadpugl-7feb9000f640d9d6f05f5d0f80a2177db920af49.tar.gz
pugl-7feb9000f640d9d6f05f5d0f80a2177db920af49.tar.bz2
pugl-7feb9000f640d9d6f05f5d0f80a2177db920af49.zip
Relax redisplay test to pass on MacOS 11.6
Since upgrading to 11.6 (on an Intel Macbook), this test no longer seems to pass. It's unfortunate to not test that small redisplay requests only result in small exposures, but I don't think the previous strict check reflects reality. Exposing more than the application requested, for whatever reason, is a natural part of window environments, so I don't know if this is something that can be reliably unit tested.
-rw-r--r--test/test_redisplay.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/test_redisplay.c b/test/test_redisplay.c
index 6f3c9d9..cf30204 100644
--- a/test/test_redisplay.c
+++ b/test/test_redisplay.c
@@ -76,10 +76,12 @@ onEvent(PuglView* view, const PuglEvent* event)
if (test->state == START) {
test->state = EXPOSED;
} else if (test->state == POSTED_REDISPLAY &&
- event->expose.x == redisplayRect.x &&
- event->expose.y == redisplayRect.y &&
- event->expose.width == redisplayRect.width &&
- event->expose.height == redisplayRect.height) {
+ event->expose.x <= redisplayRect.x &&
+ event->expose.y <= redisplayRect.y &&
+ (event->expose.x + event->expose.width >=
+ redisplayRect.x + redisplayRect.width) &&
+ (event->expose.y + event->expose.height >=
+ redisplayRect.y + redisplayRect.height)) {
test->state = REDISPLAYED;
}
break;