diff options
author | David Robillard <d@drobilla.net> | 2020-03-16 16:13:49 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-03-16 16:13:49 +0100 |
commit | ab7df6c8f3dfd820331ef96c217c0fc477972835 (patch) | |
tree | 9752e1a6e97a78e206fb16919e5584ecdcea5849 | |
parent | 28dd64df0186089f9534881550c2efaa6b7dc95c (diff) |
Window Demo: Only redisplay on update when running continuously
-rw-r--r-- | examples/pugl_window_demo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/pugl_window_demo.c b/examples/pugl_window_demo.c index 248d44e..175d782 100644 --- a/examples/pugl_window_demo.c +++ b/examples/pugl_window_demo.c @@ -129,7 +129,9 @@ onEvent(PuglView* view, const PuglEvent* event) reshapeCube((int)event->configure.width, (int)event->configure.height); break; case PUGL_UPDATE: - puglPostRedisplay(view); + if (app->continuous) { + puglPostRedisplay(view); + } break; case PUGL_EXPOSE: onDisplay(view); |