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 67227aeffd 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 <laszlo.agocs@qt.io>
This commit is contained in:
Gatis Paeglis 2018-06-14 08:49:45 +02:00 committed by Jani Heikkinen
parent a834b4d245
commit ae52029ec5

View File

@ -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)