From 7feb9000f640d9d6f05f5d0f80a2177db920af49 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 22 Apr 2022 17:52:10 -0400 Subject: 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. --- test/test_redisplay.c | 10 ++++++---- 1 file 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; -- cgit v1.2.1