summaryrefslogtreecommitdiff
path: root/src/managers/KeybindManager.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-02-27 23:14:56 +0000
committerVaxry <vaxry@vaxry.net>2024-02-27 23:15:24 +0000
commite3373669e5544c3f18cf1edcd8fcfff9c6222f5c (patch)
tree4b248f96e35919dad78e06bba255fdf107f1356e /src/managers/KeybindManager.cpp
parentf26d7aa58d78e764871ff026fb78f4322f0a6879 (diff)
wayland: implement keyboard_shortcuts_inhibit_v1
fixes #4568
Diffstat (limited to 'src/managers/KeybindManager.cpp')
-rw-r--r--src/managers/KeybindManager.cpp9
1 files changed, 9 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 =