From ae52029ec512f4c0e36371a488b72744ec641d73 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Thu, 14 Jun 2018 08:49:45 +0200 Subject: [PATCH] xcb: add QT_XCB_NO_MITSHM envvar for disabling MIT-SHM extension We had something like this already in Qt4: QT_X11_NO_MITSHM The logic from 67227aeffdf94be8d177309d27291d5b3247586c not always works. There can still be cases that xcb_shm_attach_checked() returns with no errors on remote clients. Task-number: QTBUG-68783 Change-Id: Idd27ac66eb8f1114e3d1e1ddaaab2b00f235c561 Reviewed-by: Laszlo Agocs --- src/plugins/platforms/xcb/qxcbconnection.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp index 8ed73bc2702..5fd1fc6a475 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -586,7 +586,8 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra initializeAllAtoms(); - initializeShm(); + if (!qEnvironmentVariableIsSet("QT_XCB_NO_MITSHM")) + initializeShm(); if (!qEnvironmentVariableIsSet("QT_XCB_NO_XRANDR")) initializeXRandr(); if (!has_randr_extension)