mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 01:46:00 +01:00
accumulate mods from all kbs for keybind processing
This commit is contained in:
parent
c44cafda97
commit
6f7377f381
2 changed files with 15 additions and 1 deletions
|
@ -595,7 +595,7 @@ void CInputManager::onKeyboardKey(wlr_keyboard_key_event* e, SKeyboard* pKeyboar
|
||||||
const xkb_keysym_t* keysyms;
|
const xkb_keysym_t* keysyms;
|
||||||
int syms = xkb_state_key_get_syms(pKeyboard->keyboard->keyboard->xkb_state, KEYCODE, &keysyms);
|
int syms = xkb_state_key_get_syms(pKeyboard->keyboard->keyboard->xkb_state, KEYCODE, &keysyms);
|
||||||
|
|
||||||
const auto MODS = wlr_keyboard_get_modifiers(pKeyboard->keyboard->keyboard);
|
const auto MODS = accumulateModsFromAllKBs();
|
||||||
|
|
||||||
wlr_idle_notify_activity(g_pCompositor->m_sWLRIdle, g_pCompositor->m_sSeat.seat);
|
wlr_idle_notify_activity(g_pCompositor->m_sWLRIdle, g_pCompositor->m_sSeat.seat);
|
||||||
|
|
||||||
|
@ -736,3 +736,14 @@ void CInputManager::updateCapabilities(wlr_input_device* pDev) {
|
||||||
|
|
||||||
wlr_seat_set_capabilities(g_pCompositor->m_sSeat.seat, m_uiCapabilities);
|
wlr_seat_set_capabilities(g_pCompositor->m_sSeat.seat, m_uiCapabilities);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t CInputManager::accumulateModsFromAllKBs() {
|
||||||
|
|
||||||
|
uint32_t finalMask = 0;
|
||||||
|
|
||||||
|
for (auto& kb : m_lKeyboards) {
|
||||||
|
finalMask |= wlr_keyboard_get_modifiers(kb.keyboard->keyboard);
|
||||||
|
}
|
||||||
|
|
||||||
|
return finalMask;
|
||||||
|
}
|
|
@ -91,6 +91,9 @@ private:
|
||||||
STabletTool* ensureTabletToolPresent(wlr_tablet_tool*);
|
STabletTool* ensureTabletToolPresent(wlr_tablet_tool*);
|
||||||
|
|
||||||
void applyConfigToKeyboard(SKeyboard*);
|
void applyConfigToKeyboard(SKeyboard*);
|
||||||
|
|
||||||
|
// for shared mods
|
||||||
|
uint32_t accumulateModsFromAllKBs();
|
||||||
};
|
};
|
||||||
|
|
||||||
inline std::unique_ptr<CInputManager> g_pInputManager;
|
inline std::unique_ptr<CInputManager> g_pInputManager;
|
Loading…
Reference in a new issue