From 39aba31df0b4ed2ae600e966c233bdeec721dc44 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 17 Sep 2016 18:47:36 +0300 Subject: [PATCH] Paint the window in WM_PAINT Failing to do so will result the application in getting stuck in the event loop. --- source/graphics/windows/window.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/graphics/windows/window.cpp b/source/graphics/windows/window.cpp index c6aab7d..cc36472 100644 --- a/source/graphics/windows/window.cpp +++ b/source/graphics/windows/window.cpp @@ -199,6 +199,10 @@ bool Window::event(const Event &evnt) unsigned width = update_rect.right-update_rect.left; unsigned height = update_rect.bottom-update_rect.top; signal_expose.emit(update_rect.left, update_rect.top, width, height, evnt); + + PAINTSTRUCT paint; + if(BeginPaint(priv->window, &paint)) + EndPaint(priv->window, &paint); } break; case WM_SETFOCUS: -- 2.45.2