From 39da34853f8a835ebdb2df3cf52b69496a37731a Mon Sep 17 00:00:00 2001 From: Oleksandr Tymoshenko Date: Tue, 12 Jul 2016 13:23:23 -0700 Subject: 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 --- src/plugins/generic/bsdmouse/qbsdmouse.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/plugins/generic/bsdmouse') 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 #include #include +#include +#include #include #include @@ -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() -- cgit v1.2.3