From a5234f26e4b7146ae7c2df25950f0177534cd643 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 16 Dec 2024 15:58:19 +0000 Subject: core: drop using deques in favor of vectors No point in most of these. --- src/managers/KeybindManager.hpp | 56 ++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'src/managers/KeybindManager.hpp') diff --git a/src/managers/KeybindManager.hpp b/src/managers/KeybindManager.hpp index f524f86f..6486ac3b 100644 --- a/src/managers/KeybindManager.hpp +++ b/src/managers/KeybindManager.hpp @@ -1,7 +1,7 @@ #pragma once #include "../defines.hpp" -#include +#include #include #include #include @@ -116,45 +116,45 @@ class CKeybindManager { static SDispatchResult changeMouseBindMode(const eMouseBindMode mode); private: - std::deque m_dPressedKeys; + std::vector m_dPressedKeys; - inline static std::string m_szCurrentSelectedSubmap = ""; + inline static std::string m_szCurrentSelectedSubmap = ""; - std::vector> m_vActiveKeybinds; - WP m_pLastLongPressKeybind; - SP m_pLongPressTimer, m_pRepeatKeyTimer; + std::vector> m_vActiveKeybinds; + WP m_pLastLongPressKeybind; + SP m_pLongPressTimer, m_pRepeatKeyTimer; - uint32_t m_uTimeLastMs = 0; - uint32_t m_uLastCode = 0; - uint32_t m_uLastMouseCode = 0; + uint32_t m_uTimeLastMs = 0; + uint32_t m_uLastCode = 0; + uint32_t m_uLastMouseCode = 0; - std::vector> m_vPressedSpecialBinds; + std::vector> m_vPressedSpecialBinds; - int m_iPassPressed = -1; // used for pass + int m_iPassPressed = -1; // used for pass - CTimer m_tScrollTimer; + CTimer m_tScrollTimer; - SDispatchResult handleKeybinds(const uint32_t, const SPressedKeyWithMods&, bool); + SDispatchResult handleKeybinds(const uint32_t, const SPressedKeyWithMods&, bool); - std::set m_sMkKeys = {}; - std::set m_sMkMods = {}; - eMultiKeyCase mkBindMatches(const SP); - eMultiKeyCase mkKeysymSetMatches(const std::set, const std::set); + std::set m_sMkKeys = {}; + std::set m_sMkMods = {}; + eMultiKeyCase mkBindMatches(const SP); + eMultiKeyCase mkKeysymSetMatches(const std::set, const std::set); - bool handleInternalKeybinds(xkb_keysym_t); - bool handleVT(xkb_keysym_t); + bool handleInternalKeybinds(xkb_keysym_t); + bool handleVT(xkb_keysym_t); - xkb_state* m_pXKBTranslationState = nullptr; + xkb_state* m_pXKBTranslationState = nullptr; - void updateXKBTranslationState(); - bool ensureMouseBindState(); + void updateXKBTranslationState(); + bool ensureMouseBindState(); - static bool tryMoveFocusToMonitor(PHLMONITOR monitor); - static void moveWindowOutOfGroup(PHLWINDOW pWindow, const std::string& dir = ""); - static void moveWindowIntoGroup(PHLWINDOW pWindow, PHLWINDOW pWindowInDirection); - static void switchToWindow(PHLWINDOW PWINDOWTOCHANGETO); - static uint64_t spawnRawProc(std::string, PHLWORKSPACE pInitialWorkspace); - static uint64_t spawnWithRules(std::string, PHLWORKSPACE pInitialWorkspace); + static bool tryMoveFocusToMonitor(PHLMONITOR monitor); + static void moveWindowOutOfGroup(PHLWINDOW pWindow, const std::string& dir = ""); + static void moveWindowIntoGroup(PHLWINDOW pWindow, PHLWINDOW pWindowInDirection); + static void switchToWindow(PHLWINDOW PWINDOWTOCHANGETO); + static uint64_t spawnRawProc(std::string, PHLWORKSPACE pInitialWorkspace); + static uint64_t spawnWithRules(std::string, PHLWORKSPACE pInitialWorkspace); // -------------- Dispatchers -------------- // static SDispatchResult killActive(std::string); -- cgit v1.2.3