Windows QPA: Call InvalidateRect() in WM_PAINT/GL Software rendering

Bring back the call to InvalidateRect() removed by change
6086c81e4d 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>
bb10
Friedemann Kleint 2017-01-16 13:26:09 +01:00
parent b934572b30
commit 7780ee9e5f
1 changed files with 11 additions and 1 deletions

View File

@ -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).