summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/input/backend/updatehandlerjob.cpp6
-rw-r--r--src/input/frontend/qaxisactionhandler.cpp5
2 files changed, 7 insertions, 4 deletions
diff --git a/src/input/backend/updatehandlerjob.cpp b/src/input/backend/updatehandlerjob.cpp
index 3f9dec326..08b2633cb 100644
--- a/src/input/backend/updatehandlerjob.cpp
+++ b/src/input/backend/updatehandlerjob.cpp
@@ -86,10 +86,8 @@ void UpdateHandlerJob::run()
// If so -> add to notification payload
LogicalDevice *logicalDevice = m_handler->logicalDeviceManager()->data(m_logicalDeviceHandle);
- if (logicalDevice) {
- updateActions(logicalDevice);
- updateAxes(logicalDevice);
- }
+ updateActions(logicalDevice);
+ updateAxes(logicalDevice);
}
void UpdateHandlerJob::updateAxes(LogicalDevice *device)
diff --git a/src/input/frontend/qaxisactionhandler.cpp b/src/input/frontend/qaxisactionhandler.cpp
index d69400e5b..d885c50c3 100644
--- a/src/input/frontend/qaxisactionhandler.cpp
+++ b/src/input/frontend/qaxisactionhandler.cpp
@@ -79,6 +79,11 @@ void QAxisActionHandler::setLogicalDevice(Qt3DInput::QLogicalDevice *logicalDevi
if (d->m_logicalDevice == logicalDevice)
return;
+ // Need to set the parent of the logical device if it has none
+ // so as to trigger the backend node created with a NodeCreated notification
+ if (logicalDevice && !logicalDevice->parent())
+ logicalDevice->setParent(this);
+
d->m_logicalDevice = logicalDevice;
emit logicalDeviceChanged(logicalDevice);
}