summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp12
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).