From bee82432ebf37312ef28846722fbf925ef4f04c8 Mon Sep 17 00:00:00 2001 From: Alexander Volkov Date: Wed, 15 Feb 2017 14:02:28 +0300 Subject: [PATCH] xcb: Allow to disable XInput 2 support by setting QT_XCB_NO_XI2 env var Use of XInput 2 may result in regressions. For example we call XISelectEvents for each window every time a device plugs/unplugs. It causes significant delays when there are many native windows. Change-Id: I60b799bb667d0e4bca1f9c52cdaa07b04bcc749f Task-number: QTBUG-57013 Reviewed-by: Gatis Paeglis --- 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 1af2cf9b892..5e600c740bd 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -631,7 +631,8 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra initializeXRender(); #if defined(XCB_USE_XINPUT2) m_xi2Enabled = false; - initializeXInput2(); + if (!qEnvironmentVariableIsSet("QT_XCB_NO_XI2")) + initializeXInput2(); #endif initializeXShape(); initializeXKB();