aboutsummaryrefslogtreecommitdiff
path: root/pugl/pugl_osx.m
diff options
context:
space:
mode:
Diffstat (limited to 'pugl/pugl_osx.m')
-rw-r--r--pugl/pugl_osx.m9
1 files changed, 7 insertions, 2 deletions
diff --git a/pugl/pugl_osx.m b/pugl/pugl_osx.m
index ecf9373..72e4da9 100644
--- a/pugl/pugl_osx.m
+++ b/pugl/pugl_osx.m
@@ -82,8 +82,13 @@ struct PuglInternalsImpl {
- (BOOL)windowShouldClose:(id)sender
{
- if (puglview->closeFunc)
- puglview->closeFunc(puglview);
+ const PuglEventClose ev = {
+ PUGL_CLOSE,
+ puglview,
+ 0
+ };
+ puglDispatchEvent(puglview, (PuglEvent*)&ev);
+
return YES;
}