diff options
author | Vaxry <[email protected]> | 2024-03-29 18:57:10 +0000 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-03-29 18:57:16 +0000 |
commit | 3d1bf1405ee2b368b461164210ad1485d5f32178 (patch) | |
tree | b7d7463ee7a8a4d892cb363ce05d0fdb9cbac0ad | |
parent | 53aa184d2099b1f5c1b712df1484211bad3d6093 (diff) | |
download | Hyprland-3d1bf1405ee2b368b461164210ad1485d5f32178.tar.gz Hyprland-3d1bf1405ee2b368b461164210ad1485d5f32178.zip |
keybinds: add binds:disable_keybind_grabbing
fixes #5273
-rw-r--r-- | src/config/ConfigManager.cpp | 1 | ||||
-rw-r--r-- | src/managers/KeybindManager.cpp | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 17dea1a7..1229e80b 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -490,6 +490,7 @@ CConfigManager::CConfigManager() { m_pConfig->addConfigValue("binds:focus_preferred_method", Hyprlang::INT{0}); m_pConfig->addConfigValue("binds:ignore_group_lock", Hyprlang::INT{0}); m_pConfig->addConfigValue("binds:movefocus_cycles_fullscreen", Hyprlang::INT{1}); + m_pConfig->addConfigValue("binds:disable_keybind_grabbing", Hyprlang::INT{0}); m_pConfig->addConfigValue("gestures:workspace_swipe", Hyprlang::INT{0}); m_pConfig->addConfigValue("gestures:workspace_swipe_fingers", Hyprlang::INT{3}); diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index a8d390fa..57b1b4e0 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -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); |