diff options
author | David Robillard <d@drobilla.net> | 2020-03-16 16:13:48 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-03-16 16:13:48 +0100 |
commit | 28dd64df0186089f9534881550c2efaa6b7dc95c (patch) | |
tree | e614b478b801a9fd1f7cf8b3416d4df5165d0672 /pugl/detail/mac.m | |
parent | d057cf148390f27468ed0d8c5d34a55d599d0c87 (diff) | |
download | pugl-28dd64df0186089f9534881550c2efaa6b7dc95c.tar.gz pugl-28dd64df0186089f9534881550c2efaa6b7dc95c.tar.bz2 pugl-28dd64df0186089f9534881550c2efaa6b7dc95c.zip |
Only send update events when the view is visible
Diffstat (limited to 'pugl/detail/mac.m')
-rw-r--r-- | pugl/detail/mac.m | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pugl/detail/mac.m b/pugl/detail/mac.m index 22f8088..2ec4345 100644 --- a/pugl/detail/mac.m +++ b/pugl/detail/mac.m @@ -997,7 +997,10 @@ puglUpdate(PuglWorld* world, const double timeout) for (size_t i = 0; i < world->numViews; ++i) { PuglView* const view = world->views[i]; - puglDispatchSimpleEvent(view, PUGL_UPDATE); + if ([[view->impl->drawView window] isVisible]) { + puglDispatchSimpleEvent(view, PUGL_UPDATE); + } + [view->impl->drawView displayIfNeeded]; } |