From 19cd04c85f6c1cf8f4a88f6a1588ff676f1c9779 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Thu, 21 Jul 2022 19:44:34 +0200 Subject: [PATCH] shadow keybinds on drag events --- src/layout/IHyprLayout.cpp | 3 +++ src/managers/KeybindManager.hpp | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp index f5d87068..3134e521 100644 --- a/src/layout/IHyprLayout.cpp +++ b/src/layout/IHyprLayout.cpp @@ -117,6 +117,9 @@ void IHyprLayout::onBeginDragWindow() { m_vLastDragXY = m_vBeginDragXY; g_pHyprRenderer->damageWindow(DRAGGINGWINDOW); + + // shadow to ignore any bound to MAIN_MOD + g_pKeybindManager->shadowKeybinds(); } void IHyprLayout::onEndDragWindow() { diff --git a/src/managers/KeybindManager.hpp b/src/managers/KeybindManager.hpp index 4fa314a9..c4a37330 100644 --- a/src/managers/KeybindManager.hpp +++ b/src/managers/KeybindManager.hpp @@ -31,6 +31,7 @@ public: void removeKeybind(uint32_t, const std::string&); uint32_t stringToModMask(std::string); void clearKeybinds(); + void shadowKeybinds(); std::unordered_map> m_mDispatchers; @@ -45,8 +46,6 @@ private: bool handleKeybinds(const uint32_t&, const std::string&, const xkb_keysym_t&, const int&, bool, uint32_t); - void shadowKeybinds(); - bool handleInternalKeybinds(xkb_keysym_t); bool handleVT(xkb_keysym_t);