Skip to content

Commit

Permalink
input: fix virtual devices not updating capabilities (#6366)
Browse files Browse the repository at this point in the history
Signed-off-by: void0red <[email protected]>
  • Loading branch information
void0red committed Jun 8, 2024
1 parent 7789caa commit d724556
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/managers/input/InputManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<SP<CVirtualKeyboardV1Resource>>(data)); });
m_sListeners.newVirtualMouse =
PROTO::virtualPointer->events.newPointer.registerListener([this](std::any data) { this->newVirtualMouse(std::any_cast<SP<CVirtualPointerV1Resource>>(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<SP<CVirtualKeyboardV1Resource>>(data));
updateCapabilities();
});
m_sListeners.newVirtualMouse = PROTO::virtualPointer->events.newPointer.registerListener([this](std::any data) {
this->newVirtualMouse(std::any_cast<SP<CVirtualPointerV1Resource>>(data));
updateCapabilities();
});
m_sListeners.setCursor = g_pSeatManager->events.setCursor.registerListener([this](std::any d) { this->processMouseRequest(d); });

m_sCursorSurfaceInfo.wlSurface = CWLSurface::create();
}
Expand Down

0 comments on commit d724556

Please sign in to comment.