aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/detail/win.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-03-16 16:13:48 +0100
committerDavid Robillard <d@drobilla.net>2020-03-16 16:13:48 +0100
commit28dd64df0186089f9534881550c2efaa6b7dc95c (patch)
treee614b478b801a9fd1f7cf8b3416d4df5165d0672 /pugl/detail/win.c
parentd057cf148390f27468ed0d8c5d34a55d599d0c87 (diff)
downloadpugl-28dd64df0186089f9534881550c2efaa6b7dc95c.tar.gz
pugl-28dd64df0186089f9534881550c2efaa6b7dc95c.tar.bz2
pugl-28dd64df0186089f9534881550c2efaa6b7dc95c.zip
Only send update events when the view is visible
Diffstat (limited to 'pugl/detail/win.c')
-rw-r--r--pugl/detail/win.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pugl/detail/win.c b/pugl/detail/win.c
index 22a0a25..cb4dfad 100644
--- a/pugl/detail/win.c
+++ b/pugl/detail/win.c
@@ -828,7 +828,10 @@ puglUpdate(PuglWorld* world, double timeout)
}
for (size_t i = 0; i < world->numViews; ++i) {
- puglDispatchSimpleEvent(world->views[i], PUGL_UPDATE);
+ if (world->views[i]->visible) {
+ puglDispatchSimpleEvent(world->views[i], PUGL_UPDATE);
+ }
+
UpdateWindow(world->views[i]->impl->hwnd);
}