diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-02-10 16:57:11 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2015-02-10 16:57:11 +0000 |
commit | 0866680bd904aff4fe2a643a2b81c460cbb99c77 (patch) | |
tree | 242dae052199994a35f5e68578661175241a0a71 /src/platformsupport/input/evdevtouch | |
parent | 34ea269b3b173498312b0203d6875ef3b4ba0253 (diff) | |
parent | fc35f714340d5361231506dfbead132122f59460 (diff) |
Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/dev
Diffstat (limited to 'src/platformsupport/input/evdevtouch')
-rw-r--r-- | src/platformsupport/input/evdevtouch/qevdevtouch.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/platformsupport/input/evdevtouch/qevdevtouch.cpp b/src/platformsupport/input/evdevtouch/qevdevtouch.cpp index dd831c9e82..771a1da549 100644 --- a/src/platformsupport/input/evdevtouch/qevdevtouch.cpp +++ b/src/platformsupport/input/evdevtouch/qevdevtouch.cpp @@ -39,6 +39,8 @@ #include <QLoggingCategory> #include <QtCore/private/qcore_unix_p.h> #include <QtPlatformSupport/private/qdevicediscovery_p.h> +#include <QtGui/private/qguiapplication_p.h> +#include <QtGui/private/qinputdevicemanager_p_p.h> #include <linux/input.h> #if !defined(QT_NO_MTDEV) @@ -146,6 +148,12 @@ void QEvdevTouchScreenData::registerDevice() m_device->setCapabilities(m_device->capabilities() | QTouchDevice::Pressure); QWindowSystemInterface::registerTouchDevice(m_device); + + // No monitoring of added/removed devices is done here, so for now just + // increase the number of touch devices. + QInputDeviceManager *imgr = QGuiApplicationPrivate::inputDeviceManager(); + QInputDeviceManagerPrivate::get(imgr)->setDeviceCount(QInputDeviceManager::DeviceTypeTouch, + imgr->deviceCount(QInputDeviceManager::DeviceTypeTouch) + 1); } #define LONG_BITS (sizeof(long) << 3) |