summaryrefslogtreecommitdiff
path: root/src/managers
diff options
context:
space:
mode:
Diffstat (limited to 'src/managers')
-rw-r--r--src/managers/KeybindManager.cpp9
-rw-r--r--src/managers/KeybindManager.hpp1
2 files changed, 10 insertions, 0 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index 85598f20..198aa8f6 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -497,6 +497,15 @@ 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()) {
+ 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);
+ return false;
+ }
+ }
+ }
+
for (auto& k : m_lKeybinds) {
const bool SPECIALDISPATCHER = k.handler == "global" || k.handler == "pass" || k.handler == "mouse";
const bool SPECIALTRIGGERED =
diff --git a/src/managers/KeybindManager.hpp b/src/managers/KeybindManager.hpp
index 7022593a..edd9ede2 100644
--- a/src/managers/KeybindManager.hpp
+++ b/src/managers/KeybindManager.hpp
@@ -70,6 +70,7 @@ class CKeybindManager {
bool m_bGroupsLocked = false;
std::list<SKeybind> m_lKeybinds;
+ std::list<SShortcutInhibitor> m_lShortcutInhibitors;
private:
std::deque<SPressedKeyWithMods> m_dPressedKeys;