diff --git a/src/plugins/generic/bsdkeyboard/qbsdkeyboard.cpp b/src/plugins/generic/bsdkeyboard/qbsdkeyboard.cpp index 3814563eef..6f34d066c6 100644 --- a/src/plugins/generic/bsdkeyboard/qbsdkeyboard.cpp +++ b/src/plugins/generic/bsdkeyboard/qbsdkeyboard.cpp @@ -44,6 +44,8 @@ #include #include #include +#include +#include #include #include @@ -145,6 +147,8 @@ QBsdKeyboardHandler::QBsdKeyboardHandler(const QString &key, const QString &spec m_notifier.reset(new QSocketNotifier(m_fd, QSocketNotifier::Read, this)); connect(m_notifier.data(), &QSocketNotifier::activated, this, &QBsdKeyboardHandler::readKeyboardData); + QInputDeviceManagerPrivate::get(QGuiApplicationPrivate::inputDeviceManager())->setDeviceCount( + QInputDeviceManager::DeviceTypeKeyboard, 1); } QBsdKeyboardHandler::~QBsdKeyboardHandler() 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()