summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbconnection.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-08-21 14:58:43 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-09-12 11:56:38 +0000
commitbff307ab93bd6963f84e08e8050efa6a838dba6e (patch)
tree96bee3e9fa304d1b3b5a5580e7ef6df54bb5dd9e /src/plugins/platforms/xcb/qxcbconnection.h
parente04b85b026f59120e69a4acb3f3e4469abccc325 (diff)
Fix XCB on endian mismatched client and server with SHM off
If SHM is disabled, that code path already does its own bswaping. Change-Id: I6c17f6c5c5502c8f89098d38d931b6b8f50b2640 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.h')
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h
index 9966e06c7b..c9dde35558 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.h
+++ b/src/plugins/platforms/xcb/qxcbconnection.h
@@ -412,6 +412,8 @@ public:
bool imageNeedsEndianSwap() const
{
+ if (!hasShm())
+ return false; // The non-Shm path does its own swapping
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
return m_setup->image_byte_order != XCB_IMAGE_ORDER_MSB_FIRST;
#else