summaryrefslogtreecommitdiffstats
path: root/src/opengl/qwindowsurface_gl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qwindowsurface_gl.cpp')
-rw-r--r--src/opengl/qwindowsurface_gl.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index 6571a76..ef115bd 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -499,10 +499,9 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint &
}
}
#endif
- if (d_ptr->paintedRegion.boundingRect() != geometry()) {
- // Emits warning if not supported. Should never happen unless
- // setPartialUpdateSupport(true) has been called.
- context()->d_func()->swapRegion(&d_ptr->paintedRegion);
+ if (d_ptr->paintedRegion.boundingRect() != geometry() &&
+ hasPartialUpdateSupport()) {
+ context()->d_func()->swapRegion(&d_ptr->paintedRegion);
} else
context()->swapBuffers();