aboutsummaryrefslogtreecommitdiffstats
path: root/pugl
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-03-09 21:49:52 +0100
committerDavid Robillard <d@drobilla.net>2020-03-09 21:49:52 +0100
commited301f0548438692269481096e6ef51c3ead01dc (patch)
tree1ba0bbbe8f43722b5ab8a741996c1f86af3743e0 /pugl
parentbe8ed18c668c3afa7f7690478402c4177764e599 (diff)
downloadpugl-ed301f0548438692269481096e6ef51c3ead01dc.tar.gz
pugl-ed301f0548438692269481096e6ef51c3ead01dc.tar.bz2
pugl-ed301f0548438692269481096e6ef51c3ead01dc.zip
Windows: Configure and redraw only when window is shown, not hidden
Diffstat (limited to 'pugl')
-rw-r--r--pugl/detail/win.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/pugl/detail/win.c b/pugl/detail/win.c
index 2f10ff1..b7f03a3 100644
--- a/pugl/detail/win.c
+++ b/pugl/detail/win.c
@@ -552,9 +552,11 @@ handleMessage(PuglView* view, UINT message, WPARAM wParam, LPARAM lParam)
switch (message) {
case WM_SHOWWINDOW:
- handleConfigure(view, &event);
- RedrawWindow(view->impl->hwnd, NULL, NULL,
- RDW_INVALIDATE|RDW_ALLCHILDREN|RDW_INTERNALPAINT);
+ if (wParam) {
+ handleConfigure(view, &event);
+ RedrawWindow(view->impl->hwnd, NULL, NULL,
+ RDW_INVALIDATE|RDW_ALLCHILDREN|RDW_INTERNALPAINT);
+ }
break;
case WM_SIZE:
handleConfigure(view, &event);