Fix image grab when XCB is rgb-swapping
The rgbSwap produces an image that fits the X-server, but not one that fits our internal image definitions, so instead return our internal image. Task-number: QTBUG-56806 Change-Id: I25aedf7279bcd86792213b11dbd07a77b49538de Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>bb10
parent
c7275f6723
commit
508b9b49b9
|
|
@ -837,6 +837,9 @@ void QXcbBackingStore::endPaint()
|
|||
|
||||
QImage QXcbBackingStore::toImage() const
|
||||
{
|
||||
// If the backingstore is rgbSwapped, return the internal image type here.
|
||||
if (!m_rgbImage.isNull())
|
||||
return m_rgbImage;
|
||||
return m_image && m_image->image() ? *m_image->image() : QImage();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue