summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbwindow.cpp
diff options
context:
space:
mode:
authorGatis Paeglis <gatis.paeglis@qt.io>2020-08-20 15:04:05 +0200
committerGatis Paeglis <gatis.paeglis@qt.io>2020-08-23 01:18:26 +0200
commit4f99f87578a36d59448e4332a06cdb0c8556a37a (patch)
tree74156a318ba8af14ccaef982aabe5e8cd5b00e93 /src/plugins/platforms/xcb/qxcbwindow.cpp
parent7318328c2d658f6ca2e9443c6e3e3b0a179e9811 (diff)
xcb: remove QT_XCB_NO_XI2_MOUSE code path
This code path was deprecated in 5.12 and scheduled for removal in Qt 6. See 9184384bc9d9d71a146fff535021357258a0295e. According to the source comments from f48170b479df359f47af12b03a501d9d0c386e66, apperantly XInput2 had some issues when running on Xinerama screens and therefore there was a check for it in xi2MouseEventsDisabled(). We plan to remove Xinerama support, therefore Xinerama handling in xi2MouseEventsDisabled() is irrelevant. Task-number: QTBUG-69412 Change-Id: I384d7c46337358caecccf644acc8ffbd381dc69d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbwindow.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index eba6cc0712..0dba120e30 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -480,12 +480,8 @@ void QXcbWindow::create()
atom(QXcbAtom::_XEMBED_INFO),
32, 2, (void *)data);
- if (connection()->hasXInput2()) {
- if (connection()->xi2MouseEventsDisabled())
- connection()->xi2SelectDeviceEventsCompatibility(m_window);
- else
- connection()->xi2SelectDeviceEvents(m_window);
- }
+ if (connection()->hasXInput2())
+ connection()->xi2SelectDeviceEvents(m_window);
setWindowState(window()->windowStates());
setWindowFlags(window()->flags());
@@ -1915,7 +1911,7 @@ static inline bool doCheckUnGrabAncestor(QXcbConnection *conn)
*/
if (conn) {
const bool mouseButtonsPressed = (conn->buttonState() != Qt::NoButton);
- return mouseButtonsPressed || (conn->hasXInput2() && !conn->xi2MouseEventsDisabled());
+ return mouseButtonsPressed || conn->hasXInput2();
}
return true;
}
@@ -2266,7 +2262,7 @@ bool QXcbWindow::setMouseGrabEnabled(bool grab)
if (grab && !connection()->canGrab())
return false;
- if (connection()->hasXInput2() && !connection()->xi2MouseEventsDisabled()) {
+ if (connection()->hasXInput2()) {
bool result = connection()->xi2SetMouseGrabEnabled(m_window, grab);
if (grab && result)
connection()->setMouseGrabber(this);