From d724556b7ece61a5ff4eb764e6f47ec8089439bf Mon Sep 17 00:00:00 2001 From: void0red <30990023+void0red@users.noreply.github.com> Date: Sat, 8 Jun 2024 23:15:57 +0800 Subject: [PATCH] input: fix virtual devices not updating capabilities (#6366) Signed-off-by: void0red --- src/managers/input/InputManager.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index c12ac389..ff10f303 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -52,12 +52,16 @@ CInputManager::CInputManager() { g_pHyprRenderer->setCursorFromName(m_sCursorSurfaceInfo.name); }); - m_sListeners.newIdleInhibitor = PROTO::idleInhibit->events.newIdleInhibitor.registerListener([this](std::any data) { this->newIdleInhibitor(data); }); - m_sListeners.newVirtualKeyboard = - PROTO::virtualKeyboard->events.newKeyboard.registerListener([this](std::any data) { this->newVirtualKeyboard(std::any_cast>(data)); }); - m_sListeners.newVirtualMouse = - PROTO::virtualPointer->events.newPointer.registerListener([this](std::any data) { this->newVirtualMouse(std::any_cast>(data)); }); - m_sListeners.setCursor = g_pSeatManager->events.setCursor.registerListener([this](std::any d) { this->processMouseRequest(d); }); + m_sListeners.newIdleInhibitor = PROTO::idleInhibit->events.newIdleInhibitor.registerListener([this](std::any data) { this->newIdleInhibitor(data); }); + m_sListeners.newVirtualKeyboard = PROTO::virtualKeyboard->events.newKeyboard.registerListener([this](std::any data) { + this->newVirtualKeyboard(std::any_cast>(data)); + updateCapabilities(); + }); + m_sListeners.newVirtualMouse = PROTO::virtualPointer->events.newPointer.registerListener([this](std::any data) { + this->newVirtualMouse(std::any_cast>(data)); + updateCapabilities(); + }); + m_sListeners.setCursor = g_pSeatManager->events.setCursor.registerListener([this](std::any d) { this->processMouseRequest(d); }); m_sCursorSurfaceInfo.wlSurface = CWLSurface::create(); }