summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbconnection.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-04-11 13:45:47 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-06-12 14:35:23 +0200
commitda5dea807f497bc6004f40e966e5d882a2ba72b0 (patch)
treea467091f260e2f9b6a3a38b421442f61e5f8c0b0 /src/plugins/platforms/xcb/qxcbconnection.h
parent02b7b21f9bafcba3231610fef31b590474567472 (diff)
Support hotplugging of input devices with XInput2
Since we only scan for XInput2 devices on application start, we will currently miss any devices plugged in while the application is running. This patch makes QXcbConnection listen for XInput2 hierachyChanged events and use them to trigger a rescan of XInput2 devices. This fixes a regression in Qt 5.3, where the scroll wheel on hot- plugged mice does not work until the Qt application is restarted. Change-Id: I2cdc7ca24d3ab00716cedc4b22355b6e4935b184 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.h')
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h
index f96541318c..6c9ccbcc2f 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.h
+++ b/src/plugins/platforms/xcb/qxcbconnection.h
@@ -496,8 +496,10 @@ private:
#ifdef XCB_USE_XINPUT2
void initializeXInput2();
void finalizeXInput2();
+ void xi2SetupDevices();
XInput2DeviceData *deviceForId(int id);
void xi2HandleEvent(xcb_ge_event_t *event);
+ void xi2HandleHierachyEvent(void *event);
int m_xiOpCode, m_xiEventBase, m_xiErrorBase;
#ifndef QT_NO_TABLETEVENT
struct TabletData {