summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorJacopo De Simoi <desimoi@mat.uniroma2.it>2011-03-31 10:17:59 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2011-03-31 10:17:59 (GMT)
commit8163f070aee2b3d40e588009c837d81a145fcfd1 (patch)
treec31e0fedb0d094c6d18656ec4b8ba277348e2a21 /src/gui/kernel
parentb6de9d5bcb3eb503dc2b1f9559d1e89f778d1d76 (diff)
downloadQt-8163f070aee2b3d40e588009c837d81a145fcfd1.zip
Qt-8163f070aee2b3d40e588009c837d81a145fcfd1.tar.gz
Qt-8163f070aee2b3d40e588009c837d81a145fcfd1.tar.bz2
Fix window pixmap initialization strategy
If a compositing manager is active, setting the window pixmap background to None for ARGB windows makes little sense. In this case the background should be transparent Merge-request: 1135 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qwidget_x11.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp
index 4f39443..5ece7d6 100644
--- a/src/gui/kernel/qwidget_x11.cpp
+++ b/src/gui/kernel/qwidget_x11.cpp
@@ -1380,9 +1380,15 @@ void QWidgetPrivate::updateSystemBackground()
if (brush.style() == Qt::NoBrush
|| q->testAttribute(Qt::WA_NoSystemBackground)
|| q->testAttribute(Qt::WA_UpdatesDisabled)
- || type == Qt::Popup || type == Qt::ToolTip
- )
- XSetWindowBackgroundPixmap(X11->display, q->internalWinId(), XNone);
+ || type == Qt::Popup || type == Qt::ToolTip) {
+ if (QX11Info::isCompositingManagerRunning()
+ && q->testAttribute(Qt::WA_TranslucentBackground)
+ && !(q->parent()))
+ XSetWindowBackground(X11->display, q->internalWinId(),
+ QColormap::instance(xinfo.screen()).pixel(Qt::transparent));
+ else
+ XSetWindowBackgroundPixmap(X11->display, q->internalWinId(), XNone);
+ }
else if (brush.style() == Qt::SolidPattern && brush.isOpaque())
XSetWindowBackground(X11->display, q->internalWinId(),
QColormap::instance(xinfo.screen()).pixel(brush.color()));