summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-02-27 09:42:49 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-03-01 10:15:05 +0000
commit635b5115c4d3f18ed5a9a924444232520eb6bbe5 (patch)
tree7abe209ed7090d39a238377f3b74fb849a71efbf /src/plugins/platforms/xcb
parentdaa39f84996700d2459d8e570ac1b3f2f2cdffd0 (diff)
Fix QXcbScreen::format() when rgb-swap is needed
QXcbScreen::format() was producing console warning and returning invalid format if rgb-swap was necessary. Let it match possibly reversed formats since the backing-store will swizzle it anyway. Change-Id: I6a53cb8ceda029e9d708d25ad635832f1163ffe7 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
index 49bf5181cc..df458e85d7 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
@@ -583,7 +583,9 @@ QRect QXcbScreen::availableGeometry() const
QImage::Format QXcbScreen::format() const
{
QImage::Format format;
- qt_xcb_imageFormatForVisual(connection(), screen()->root_depth, visualForId(screen()->root_visual), &format);
+ bool needsRgbSwap;
+ qt_xcb_imageFormatForVisual(connection(), screen()->root_depth, visualForId(screen()->root_visual), &format, &needsRgbSwap);
+ // We are ignoring needsRgbSwap here and just assumes the backing-store will handle it.
return format;
}