summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qpixmap_x11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/image/qpixmap_x11.cpp')
-rw-r--r--src/gui/image/qpixmap_x11.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp
index 3d9c363..32676ba 100644
--- a/src/gui/image/qpixmap_x11.cpp
+++ b/src/gui/image/qpixmap_x11.cpp
@@ -1321,6 +1321,15 @@ QBitmap QX11PixmapData::mask() const
return mask;
}
+bool QX11PixmapData::hasMask() const
+{
+ return
+#ifndef QT_NO_XRENDER
+ (picture && d == 32) ||
+#endif
+ (d == 1) || x11_mask;
+}
+
/*!
Sets a mask bitmap.
@@ -1549,7 +1558,7 @@ QImage QX11PixmapData::toImage(const QRect &rect) const
if (!xiWrapper.xi)
return QImage();
- if (canTakeQImageFromXImage(xiWrapper))
+ if (!x11_mask && canTakeQImageFromXImage(xiWrapper))
return takeQImageFromXImage(xiWrapper);
QImage image = toImage(xiWrapper, rect);