From 635b5115c4d3f18ed5a9a924444232520eb6bbe5 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 27 Feb 2018 09:42:49 +0100 Subject: 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 --- src/plugins/platforms/xcb/qxcbscreen.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms/xcb') 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; } -- cgit v1.2.3