diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-01-16 13:26:09 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-01-19 20:44:18 +0000 |
commit | 7780ee9e5f20f80ab9e053058d0b6d92586cf876 (patch) | |
tree | f0287ade82d5a5950bcc369078861ac1f02f2a4e /src/plugins/platforms/windows | |
parent | b934572b30ca64ea0f85dffaeb9ff3c30add1e7e (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>
Diffstat (limited to 'src/plugins/platforms/windows')
-rw-r--r-- | src/plugins/platforms/windows/qwindowswindow.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index a9b061ad73..6894062d61 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -43,7 +43,7 @@ #include "qwindowsscreen.h" #include "qwindowsintegration.h" #include "qwindowsnativeinterface.h" -#include "qwindowsopenglcontext.h" +#include "qwindowsglcontext.h" #ifdef QT_NO_CURSOR # include "qwindowscursor.h" #endif @@ -1582,6 +1582,16 @@ bool QWindowsWindow::handleWmPaint(HWND hwnd, UINT message, return false; PAINTSTRUCT ps; +#if QT_CONFIG(dynamicgl) + // 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 // dynamicgl + BeginPaint(hwnd, &ps); // Observed painting problems with Aero style disabled (QTBUG-7865). |