diff options
Diffstat (limited to 'pugl/pugl_osx.m')
-rw-r--r-- | pugl/pugl_osx.m | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/pugl/pugl_osx.m b/pugl/pugl_osx.m index aaae212..be900f1 100644 --- a/pugl/pugl_osx.m +++ b/pugl/pugl_osx.m @@ -677,8 +677,8 @@ puglWaitForEvent(PuglView* view) unsupported selector error at runtime. I have no idea why, so just get the event and keep it around until the call to puglProcessEvents. */ if (!view->impl->nextEvent) { - view->impl->nextEvent = [view->impl->window - nextEventMatchingMask: NSAnyEventMask]; + view->impl->nextEvent = + [view->impl->window nextEventMatchingMask:NSAnyEventMask]; } return PUGL_SUCCESS; @@ -690,8 +690,12 @@ puglProcessEvents(PuglView* view) while (true) { // Get the next event, or use the cached one from puglWaitForEvent if (!view->impl->nextEvent) { - view->impl->nextEvent = [view->impl->window - nextEventMatchingMask: NSAnyEventMask]; + view->impl->nextEvent = + [view->impl->window nextEventMatchingMask:NSAnyEventMask + untilDate:nil + inMode:NSDefaultRunLoopMode + dequeue:YES]; + } if (!view->impl->nextEvent) { |