From f3c8f336fa6a702dc680769d079aa5c4b4e2a645 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 12 May 2023 17:06:17 -0400 Subject: MacOS: Fix inverted puglPostRedisplay() coordinates --- src/mac.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/mac.m') diff --git a/src/mac.m b/src/mac.m index c202ef6..ef0a730 100644 --- a/src/mac.m +++ b/src/mac.m @@ -1643,7 +1643,11 @@ puglPostRedisplay(PuglView* view) PuglStatus puglPostRedisplayRect(PuglView* view, const PuglRect rect) { - const NSRect rectPx = rectToNsRect(rect); + const NSRect rectPx = { + {(double)rect.x, + (double)view->lastConfigure.height - (rect.y + rect.height)}, + {(double)rect.width, (double)rect.height}, + }; [view->impl->drawView setNeedsDisplayInRect:nsRectToPoints(view, rectPx)]; -- cgit v1.2.1