aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pugl/detail/mac.h1
-rw-r--r--pugl/detail/mac.m4
-rw-r--r--pugl/detail/mac_cairo.m6
-rw-r--r--pugl/detail/mac_gl.m6
4 files changed, 15 insertions, 2 deletions
diff --git a/pugl/detail/mac.h b/pugl/detail/mac.h
index 9a5997d..8146373 100644
--- a/pugl/detail/mac.h
+++ b/pugl/detail/mac.h
@@ -36,6 +36,7 @@
}
- (void) dispatchConfigure:(NSRect)bounds;
+- (void) dispatchExpose:(NSRect)rect;
@end
diff --git a/pugl/detail/mac.m b/pugl/detail/mac.m
index 6900ed6..36aff9b 100644
--- a/pugl/detail/mac.m
+++ b/pugl/detail/mac.m
@@ -77,7 +77,7 @@
puglview->backend->resize(puglview, bounds.size.width, bounds.size.height);
}
-- (void) drawRect:(NSRect)rect
+- (void) dispatchExpose:(NSRect)rect
{
const PuglEventExpose ev = {
PUGL_EXPOSE,
@@ -850,7 +850,7 @@ puglGetTime(PuglView* view)
void
puglPostRedisplay(PuglView* view)
{
- [view->impl->wrapperView setNeedsDisplay: YES];
+ [view->impl->drawView setNeedsDisplay: YES];
}
PuglNativeWindow
diff --git a/pugl/detail/mac_cairo.m b/pugl/detail/mac_cairo.m
index b0a8db5..1f4452f 100644
--- a/pugl/detail/mac_cairo.m
+++ b/pugl/detail/mac_cairo.m
@@ -53,6 +53,12 @@
[wrapper dispatchConfigure:[self bounds]];
}
+- (void) drawRect:(NSRect)rect
+{
+ PuglWrapperView* wrapper = (PuglWrapperView*)[self superview];
+ [wrapper dispatchExpose:rect];
+}
+
@end
static int
diff --git a/pugl/detail/mac_gl.m b/pugl/detail/mac_gl.m
index 4a6e39a..6cdf6f6 100644
--- a/pugl/detail/mac_gl.m
+++ b/pugl/detail/mac_gl.m
@@ -91,6 +91,12 @@ typedef NSUInteger NSWindowStyleMask;
[wrapper dispatchConfigure:[self bounds]];
}
+- (void) drawRect:(NSRect)rect
+{
+ PuglWrapperView* wrapper = (PuglWrapperView*)[self superview];
+ [wrapper dispatchExpose:rect];
+}
+
@end
static int