From 45b205692e457bf39a245436b7db0bb03bd27bbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 24 Feb 2010 15:34:49 +0100 Subject: Fixed translucent window rendering on 16 bit X11. Don't assume format is the same as systemFormat() in the QNativeImage constructor, for translucent windows it's always ARGB32_Premultiplied, and the depth of the window is always 32 bit. Reviewed-by: Trond --- src/gui/image/qnativeimage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp index 2226901..8446387 100644 --- a/src/gui/image/qnativeimage.cpp +++ b/src/gui/image/qnativeimage.cpp @@ -182,7 +182,7 @@ QNativeImage::QNativeImage(int width, int height, QImage::Format format,bool /* qWarning() << "Error while marking the shared memory segment to be destroyed"; ok = (xshminfo.shmaddr != (char*)-1); if (ok) - image = QImage((uchar *)xshmimg->data, width, height, systemFormat()); + image = QImage((uchar *)xshmimg->data, width, height, format); } xshminfo.readOnly = false; if (ok) -- cgit v0.12