summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Volkov <a.volkov@rusbitech.ru>2017-02-15 14:02:28 +0300
committerAlexander Volkov <a.volkov@rusbitech.ru>2017-02-16 09:53:50 +0000
commitbee82432ebf37312ef28846722fbf925ef4f04c8 (patch)
tree80b75d90a8330b3abe912e8b45b12405afd87ff2
parenta373a01ed73b29b237e2f3a7c69955dd160fc34d (diff)
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 <gatis.paeglis@qt.io>
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index 1af2cf9b89..5e600c740b 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();