aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-03-16 16:13:49 +0100
committerDavid Robillard <d@drobilla.net>2020-03-16 16:13:49 +0100
commitab7df6c8f3dfd820331ef96c217c0fc477972835 (patch)
tree9752e1a6e97a78e206fb16919e5584ecdcea5849
parent28dd64df0186089f9534881550c2efaa6b7dc95c (diff)
Window Demo: Only redisplay on update when running continuously
-rw-r--r--examples/pugl_window_demo.c4
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);