summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpaintengine_x11.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-10-05 13:36:38 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-10-05 14:38:13 (GMT)
commit1210fa5b2d65895ad2be1f9ca7cae586e3b29dc1 (patch)
tree9353ed33b671287aab9f5edee2b791b7ef870190 /src/gui/painting/qpaintengine_x11.cpp
parentd763b9a56c5f488a6a4187f6aa454405ab75d09b (diff)
downloadQt-1210fa5b2d65895ad2be1f9ca7cae586e3b29dc1.zip
Qt-1210fa5b2d65895ad2be1f9ca7cae586e3b29dc1.tar.gz
Qt-1210fa5b2d65895ad2be1f9ca7cae586e3b29dc1.tar.bz2
Fixed bug in X11 paint engine causing source pixmap depth to change.
Setting a pixmap brush when painting to a 32-bit target might cause the source pixmap to be converted to 32-bit. We should detach the pixmap if we need to convert it. Reviewed-by: Trond
Diffstat (limited to 'src/gui/painting/qpaintengine_x11.cpp')
-rw-r--r--src/gui/painting/qpaintengine_x11.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/painting/qpaintengine_x11.cpp b/src/gui/painting/qpaintengine_x11.cpp
index 4d2521a..59482c6 100644
--- a/src/gui/painting/qpaintengine_x11.cpp
+++ b/src/gui/painting/qpaintengine_x11.cpp
@@ -1402,6 +1402,7 @@ void QX11PaintEngine::updateBrush(const QBrush &brush, const QPointF &origin)
mask |= GCTile;
#ifndef QT_NO_XRENDER
if (d->pdev_depth == 32 && d->brush_pm.depth() != 32) {
+ d->brush_pm.detach();
QX11PixmapData *brushData = static_cast<QX11PixmapData*>(d->brush_pm.data.data());
brushData->convertToARGB32();
}