aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/pugl_embed_demo.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/examples/pugl_embed_demo.c b/examples/pugl_embed_demo.c
index f222773..3907801 100644
--- a/examples/pugl_embed_demo.c
+++ b/examples/pugl_embed_demo.c
@@ -102,8 +102,10 @@ swapFocus(PuglTestApp* app)
puglGrabFocus(app->parent);
}
- puglPostRedisplay(app->parent);
- puglPostRedisplay(app->child);
+ if (!app->continuous) {
+ puglPostRedisplay(app->parent);
+ puglPostRedisplay(app->child);
+ }
}
static void
@@ -224,12 +226,16 @@ onEvent(PuglView* view, const PuglEvent* event)
app->yAngle += event->motion.y - app->lastMouseY;
app->lastMouseX = event->motion.x;
app->lastMouseY = event->motion.y;
- puglPostRedisplay(view);
- puglPostRedisplay(app->parent);
+ if (!app->continuous) {
+ puglPostRedisplay(view);
+ puglPostRedisplay(app->parent);
+ }
break;
case PUGL_SCROLL:
app->dist = fmaxf(10.0f, app->dist + (float)event->scroll.dy);
- puglPostRedisplay(view);
+ if (!app->continuous) {
+ puglPostRedisplay(view);
+ }
break;
case PUGL_ENTER_NOTIFY:
app->mouseEntered = true;