diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-03-18 23:25:26 +0100 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-03-18 23:25:26 +0100 |
| commit | 5971576a50986646d7af301d8221e049f39ddb0b (patch) | |
| tree | 3bf41593873d95def374259022fff1251d10d8d0 /src/managers/InputManager.cpp | |
| parent | 7f8648fc8badc4c78d7a9f5a9d6eff8413680c85 (diff) | |
keyboard fix
Diffstat (limited to 'src/managers/InputManager.cpp')
| -rw-r--r-- | src/managers/InputManager.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/managers/InputManager.cpp b/src/managers/InputManager.cpp index e953e705..c856f031 100644 --- a/src/managers/InputManager.cpp +++ b/src/managers/InputManager.cpp @@ -52,9 +52,9 @@ Vector2D CInputManager::getMouseCoordsInternal() { } void CInputManager::newKeyboard(wlr_input_device* keyboard) { - m_dKeyboards.push_back(SKeyboard()); + m_lKeyboards.push_back(SKeyboard()); - const auto PNEWKEYBOARD = &m_dKeyboards.back(); + const auto PNEWKEYBOARD = &m_lKeyboards.back(); PNEWKEYBOARD->keyboard = keyboard; @@ -89,6 +89,18 @@ void CInputManager::newMouse(wlr_input_device* mouse) { wlr_cursor_attach_input_device(g_pCompositor->m_sWLRCursor, mouse); } +void CInputManager::destroyKeyboard(SKeyboard* pKeyboard) { + wl_list_remove(&pKeyboard->listen_keyboardMod.link); + wl_list_remove(&pKeyboard->listen_keyboardKey.link); + wl_list_remove(&pKeyboard->listen_keyboardDestroy.link); + + m_lKeyboards.remove(*pKeyboard); +} + +void CInputManager::destroyMouse(wlr_input_device* mouse) { + // +} + void CInputManager::onKeyboardKey(wlr_event_keyboard_key* e, SKeyboard* pKeyboard) { const auto KEYCODE = e->keycode + 8; // Because to xkbcommon it's +8 from libinput |
