Deep copy of Shadow pixmap again

Basically revert of fb9afb61f8c1e7db4ae034435a9d54b5e87977d5.
Fixes an issue of black shadows which could sometimes happen in
OpenGL backend.
icc-effect-5.14.5
Martin Gräßlin 2011-06-17 19:48:14 +02:00
parent 6569bb071f
commit 04020f0b42
1 changed files with 2 additions and 2 deletions

View File

@ -99,11 +99,11 @@ QVector< long > Shadow::readX11ShadowProperty(WId id)
bool Shadow::init(const QVector< long > &data)
{
for (int i=0; i<ShadowElementsCount; ++i) {
QPixmap pix = QPixmap::fromX11Pixmap(data[i]);
QPixmap pix = QPixmap::fromX11Pixmap(data[i], QPixmap::ExplicitlyShared);
if (pix.isNull() || pix.depth() != 32) {
return false;
}
m_shadowElements[i] = pix;
m_shadowElements[i] = pix.copy(0, 0, pix.width(), pix.height());
}
m_topOffset = data[ShadowElementsCount];
m_rightOffset = data[ShadowElementsCount+1];