]> git.tdb.fi Git - libs/gui.git/commitdiff
Paint the window in WM_PAINT
authorMikko Rasa <tdb@tdb.fi>
Sat, 17 Sep 2016 15:47:36 +0000 (18:47 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 17 Sep 2016 15:47:36 +0000 (18:47 +0300)
Failing to do so will result the application in getting stuck in the
event loop.

source/graphics/windows/window.cpp

index c6aab7d6351a32ba35775e8524716873b193e540..cc364723d292b109dcce847122f6096881befe1d 100644 (file)
@@ -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: