aboutsummaryrefslogtreecommitdiffstats
path: root/src/mac.m
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-05-12 17:06:17 -0400
committerDavid Robillard <d@drobilla.net>2023-05-12 17:08:24 -0400
commitf3c8f336fa6a702dc680769d079aa5c4b4e2a645 (patch)
treefe0621b2d4dc2c33d6ccd950faad674321b50561 /src/mac.m
parent8f6149b04b6e373987b9fac40673fc98d028998a (diff)
downloadpugl-f3c8f336fa6a702dc680769d079aa5c4b4e2a645.tar.gz
pugl-f3c8f336fa6a702dc680769d079aa5c4b4e2a645.tar.bz2
pugl-f3c8f336fa6a702dc680769d079aa5c4b4e2a645.zip
MacOS: Fix inverted puglPostRedisplay() coordinates
Diffstat (limited to 'src/mac.m')
-rw-r--r--src/mac.m6
1 files changed, 5 insertions, 1 deletions
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)];