From ed301f0548438692269481096e6ef51c3ead01dc Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 9 Mar 2020 21:49:52 +0100 Subject: Windows: Configure and redraw only when window is shown, not hidden --- pugl/detail/win.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'pugl') 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); -- cgit v1.2.1