Only use a translucent background if there is support for alpha
Change-Id: Ia8d9e543fac4b6e790fa38cf04c5a782d72d72df Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
This commit is contained in:
parent
091a386eaf
commit
dc5f9d0c31
@ -62,8 +62,10 @@ QXcbNativeBackingStore::QXcbNativeBackingStore(QWindow *window)
|
|||||||
: QPlatformBackingStore(window)
|
: QPlatformBackingStore(window)
|
||||||
, m_translucentBackground(false)
|
, m_translucentBackground(false)
|
||||||
{
|
{
|
||||||
if (QXcbWindow *w = static_cast<QXcbWindow *>(window->handle()))
|
if (QXcbWindow *w = static_cast<QXcbWindow *>(window->handle())) {
|
||||||
m_translucentBackground = w->connection()->hasXRender() && QImage::toPixelFormat(w->imageFormat()).alphaSize() > 0;
|
m_translucentBackground = w->connection()->hasXRender() &&
|
||||||
|
QImage::toPixelFormat(w->imageFormat()).alphaUsage() == QPixelFormat::UsesAlpha;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QXcbNativeBackingStore::~QXcbNativeBackingStore()
|
QXcbNativeBackingStore::~QXcbNativeBackingStore()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user