summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGatis Paeglis <gatis.paeglis@nokia.com>2012-06-26 19:14:45 +0200
committerQt by Nokia <qt-info@nokia.com>2012-06-28 06:22:00 +0200
commitfdcdae21d8ec077d8c24786ed5d4420fe770bcbf (patch)
treed3b8357a3d9458d1389ea06226cdb361bbc0486e
parent55150f0f0bac0a6343da60d8128fc4216b57db2b (diff)
Set window's surface format to support alpha channel.
Task-number: QTBUG-26114 Change-Id: I33f191373327832fb9d3054366412ec5be855cff Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
-rw-r--r--src/platformsupport/dnd/qshapedpixmapdndwindow.cpp4
-rw-r--r--src/plugins/platforms/xcb/qxcbdrag.cpp1
2 files changed, 4 insertions, 1 deletions
diff --git a/src/platformsupport/dnd/qshapedpixmapdndwindow.cpp b/src/platformsupport/dnd/qshapedpixmapdndwindow.cpp
index 4eed1e7d85..95ceb0dbbc 100644
--- a/src/platformsupport/dnd/qshapedpixmapdndwindow.cpp
+++ b/src/platformsupport/dnd/qshapedpixmapdndwindow.cpp
@@ -50,6 +50,9 @@ QShapedPixmapWindow::QShapedPixmapWindow()
: QWindow(),
m_backingStore(0)
{
+ QSurfaceFormat format;
+ format.setAlphaBufferSize(8);
+ setFormat(format);
setSurfaceType(RasterSurface);
setWindowFlags(Qt::ToolTip | Qt::FramelessWindowHint |
Qt::X11BypassWindowManagerHint | Qt::WindowTransparentForInput);
@@ -67,6 +70,7 @@ void QShapedPixmapWindow::render()
{
QPainter p(device);
+ p.setCompositionMode(QPainter::CompositionMode_Source);
p.drawPixmap(0, 0, m_pixmap);
}
diff --git a/src/plugins/platforms/xcb/qxcbdrag.cpp b/src/plugins/platforms/xcb/qxcbdrag.cpp
index 3299180577..176d1bbe2e 100644
--- a/src/plugins/platforms/xcb/qxcbdrag.cpp
+++ b/src/plugins/platforms/xcb/qxcbdrag.cpp
@@ -465,7 +465,6 @@ void QXcbDrag::move(const QMouseEvent *me)
move.window = target;
move.format = 32;
move.type = atom(QXcbAtom::XdndPosition);
- move.window = target;
move.data.data32[0] = connection()->clipboard()->owner();
move.data.data32[1] = 0; // flags
move.data.data32[2] = (globalPos.x() << 16) + globalPos.y();