Set window's surface format to support alpha channel.

Task-number: QTBUG-26114
Change-Id: I33f191373327832fb9d3054366412ec5be855cff
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
bb10
Gatis Paeglis 2012-06-26 19:14:45 +02:00 committed by Qt by Nokia
parent 55150f0f0b
commit fdcdae21d8
2 changed files with 4 additions and 1 deletions

View File

@ -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);
}

View File

@ -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();