summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/styles/qwindowsstyle.cpp4
-rw-r--r--src/opengl/qwindowsurface_gl.cpp7
2 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp
index 32a6d8d..4144b80 100644
--- a/src/gui/styles/qwindowsstyle.cpp
+++ b/src/gui/styles/qwindowsstyle.cpp
@@ -1395,8 +1395,8 @@ void QWindowsStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt,
if (!QPixmapCache::find(pixmapName, pixmap)) {
int border = size/5;
int sqsize = 2*(size/2);
- QImage image(sqsize, sqsize, QImage::Format_ARGB32);
- image.fill(Qt::transparent);
+ QImage image(sqsize, sqsize, QImage::Format_ARGB32_Premultiplied);
+ image.fill(0);
QPainter imagePainter(&image);
QPolygon a;
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index b8716ce..7243f02 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -520,9 +520,10 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint &
// did_paint is set to true in ::beginPaint. ::beginPaint means that we
// at least cleared the background (= painted something). In EGL API it's a
- // mistakte to call swapBuffers if nothing was painted. This check protects
- // the flush func from being executed if it's for nothing.
- if (!d_ptr->did_paint)
+ // mistake to call swapBuffers if nothing was painted unless
+ // EGL_BUFFER_PRESERVED is set. This check protects the flush func from
+ // being executed if it's for nothing.
+ if (!hasPartialUpdateSupport() && !d_ptr->did_paint)
return;
QWidget *parent = widget->internalWinId() ? widget : widget->nativeParentWidget();