summaryrefslogtreecommitdiffstats
path: root/src/plugins/generic/bsdmouse
diff options
context:
space:
mode:
authorOleksandr Tymoshenko <gonzo@bluezbox.com>2016-07-12 13:23:23 -0700
committerOleksandr Tymoshenko <gonzo@bluezbox.com>2016-07-14 18:32:40 +0000
commit39da34853f8a835ebdb2df3cf52b69496a37731a (patch)
tree859f134a0e3ce9dcd6c63f6edaad1b0e72b9014b /src/plugins/generic/bsdmouse
parenta013bec13e4bf92752a0e8d90eff0019d41ad9e0 (diff)
Added QInputDeviceManager device tracking for bsdkeyboard and bsdmouse
After initialization bsdkeyboard and bsdmouse didn't notify QInputDeviceManager about new input devices so parts of Qt that relied on these notifications (like QFbCursor) were not aware about new functionality. Set number of keyboard/pointer devices to 1 when bsdkeyboard and bsdmouse plugins successfully initialized Change-Id: I440826d2b7f3653fd43e58df8239346ba1e8a223 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/plugins/generic/bsdmouse')
-rw-r--r--src/plugins/generic/bsdmouse/qbsdmouse.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/generic/bsdmouse/qbsdmouse.cpp b/src/plugins/generic/bsdmouse/qbsdmouse.cpp
index 125d74470b..4875fd96bd 100644
--- a/src/plugins/generic/bsdmouse/qbsdmouse.cpp
+++ b/src/plugins/generic/bsdmouse/qbsdmouse.cpp
@@ -38,6 +38,8 @@
#include <QPoint>
#include <QGuiApplication>
#include <qpa/qwindowsysteminterface.h>
+#include <private/qguiapplication_p.h>
+#include <private/qinputdevicemanager_p_p.h>
#include <private/qcore_unix_p.h>
#include <qdebug.h>
@@ -105,6 +107,8 @@ QBsdMouseHandler::QBsdMouseHandler(const QString &key, const QString &specificat
m_notifier.reset(new QSocketNotifier(m_devFd, QSocketNotifier::Read, this));
connect(m_notifier.data(), &QSocketNotifier::activated, this, &QBsdMouseHandler::readMouseData);
+ QInputDeviceManagerPrivate::get(QGuiApplicationPrivate::inputDeviceManager())->setDeviceCount(
+ QInputDeviceManager::DeviceTypePointer, 1);
}
QBsdMouseHandler::~QBsdMouseHandler()