summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@theqtcompany.com>2015-07-28 07:53:43 +0200
committerShawn Rutledge <shawn.rutledge@theqtcompany.com>2015-07-28 12:03:20 +0000
commit7e89c7b8552b670f090fefb4b40fce348ecc416c (patch)
treeb2cf0eebef2c2222244c503d0d06a9152f45caa2 /src/plugins/platforms/xcb
parent8d6ef359c82424fed03f9d6663d91aaf758d2b62 (diff)
xcb: fix tablet proximity again
Patch 53d289ec4c0f512a3475da4bbf1f940cd6838ace caused it not to select property change events, which are needed separately for each tablet device. It's not enough to select them on the master device. Change-Id: Ibb6c7990d2edd865019eacfa7eed4bf818f7557e Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_xi2.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
index 2f46436ce2..150047fe12 100644
--- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
@@ -306,14 +306,13 @@ void QXcbConnection::xi2Select(xcb_window_t window)
const bool pointerSelected = isAtLeastXI22() && xi2MouseEvents();
QSet<int> tabletDevices;
#ifndef QT_NO_TABLETEVENT
- if (!m_tabletData.isEmpty() && !pointerSelected) {
+ if (!m_tabletData.isEmpty()) {
unsigned int tabletBitMask;
unsigned char *xiTabletBitMask = reinterpret_cast<unsigned char *>(&tabletBitMask);
QVector<XIEventMask> xiEventMask(m_tabletData.count());
- tabletBitMask = XI_ButtonPressMask;
- tabletBitMask |= XI_ButtonReleaseMask;
- tabletBitMask |= XI_MotionMask;
- tabletBitMask |= XI_PropertyEventMask;
+ tabletBitMask = XI_PropertyEventMask;
+ if (!pointerSelected)
+ tabletBitMask |= XI_ButtonPressMask | XI_ButtonReleaseMask | XI_MotionMask;
for (int i = 0; i < m_tabletData.count(); ++i) {
int deviceId = m_tabletData.at(i).deviceId;
tabletDevices.insert(deviceId);