diff options
-rw-r--r-- | src/opengl/qwindowsurface_gl.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index e9da452..6b82ed3 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -494,10 +494,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(); |