diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-01-16 13:26:09 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-02-14 12:02:12 +0000 |
commit | 8969557673b6a636bdf6e5f963000611d5fa6edd (patch) | |
tree | 6a440b0ef997fdeaf80a5045ed28d63ce979a585 /src | |
parent | aad7e9551573ddf16bfba7a07ce6e24d92dc5483 (diff) |
Windows QPA: Call InvalidateRect() in WM_PAINT/GL Software rendering
Bring back the call to InvalidateRect() removed by change
6086c81e4d999d88ce4d412 since it seems that GL Software rendering
requires it (also for single buffer mode).
Task-number: QTBUG-58178
Change-Id: I197a1b3c3906c4afa43943db30dbc07dfb656cc7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 7780ee9e5f20f80ab9e053058d0b6d92586cf876)
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platforms/windows/qwindowswindow.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index b38d7c29ae..8770c6350a 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -37,7 +37,11 @@ #include "qwindowsdrag.h" #include "qwindowsscreen.h" #include "qwindowsintegration.h" -#include "qwindowsopenglcontext.h" +#ifdef QT_OPENGL_DYNAMIC +# include "qwindowsglcontext.h" +#else +# include "qwindowsopenglcontext.h" +#endif #ifdef QT_NO_CURSOR # include "qwindowscursor.h" #endif @@ -1568,6 +1572,16 @@ bool QWindowsWindow::handleWmPaint(HWND hwnd, UINT message, return false; PAINTSTRUCT ps; +#ifdef QT_OPENGL_DYNAMIC + // QTBUG-58178: GL software rendering needs InvalidateRect() to suppress + // artifacts while resizing. + if (testFlag(OpenGLSurface) + && QOpenGLStaticContext::opengl32.moduleIsNotOpengl32() + && QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL) { + InvalidateRect(hwnd, 0, false); + } +#endif // QT_OPENGL_DYNAMIC + BeginPaint(hwnd, &ps); // Observed painting problems with Aero style disabled (QTBUG-7865). |