keybinds: add binds:disable_keybind_grabbing

fixes #5273
This commit is contained in:
Vaxry
2024-03-29 18:57:10 +00:00
parent 53aa184d20
commit 3d1bf1405e
2 changed files with 4 additions and 1 deletions

View File

@@ -501,7 +501,9 @@ bool CKeybindManager::handleKeybinds(const uint32_t modmask, const SPressedKeyWi
if (g_pCompositor->m_sSeat.exclusiveClient)
Debug::log(LOG, "Keybind handling only locked (inhibitor)");
if (!m_lShortcutInhibitors.empty()) {
static auto PDISABLEINHIBIT = CConfigValue<Hyprlang::INT>("binds:disable_keybind_grabbing");
if (!*PDISABLEINHIBIT && !m_lShortcutInhibitors.empty()) {
for (auto& i : m_lShortcutInhibitors) {
if (i.pWlrInhibitor->surface == g_pCompositor->m_pLastFocus) {
Debug::log(LOG, "Keybind handling is disabled due to an inhibitor for surface {:x}", (uintptr_t)i.pWlrInhibitor->surface);