diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 076b64663db..1aee48933fb 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -1190,7 +1190,7 @@ void CConfigManager::handleSubmap(const std::string& command, const std::string& // currentCategory.starts_with("submap") is here to support the old format, otherwise we should only have the first part of the condition if (!m_szCurrentSubmap.getHasAtLeastOneResetBinding() && currentCategory.starts_with("submap")) parseError = "The reset variable is required in a submap"; - else + else g_pSubmaps->push_back(m_szCurrentSubmap); m_szCurrentSubmap = SubmapOptions(""); diff --git a/src/config/SubmapManager.hpp b/src/config/SubmapManager.hpp index 9f6f4194229..f2147b3fcbf 100644 --- a/src/config/SubmapManager.hpp +++ b/src/config/SubmapManager.hpp @@ -7,12 +7,11 @@ class SubmapOptions { public: - SubmapOptions(std::string name) { - this->name = name; + this->name = name; this->persist = true; this->consume = false; - + this->hasAtLeastOneResetBinding = false; } @@ -35,7 +34,7 @@ class SubmapOptions { void setConsume(bool consume) { this->consume = consume; } - + void setPersist(bool persist) { this->persist = persist; } @@ -44,13 +43,12 @@ class SubmapOptions { this->hasAtLeastOneResetBinding = true; } - private: - bool hasAtLeastOneResetBinding; + bool hasAtLeastOneResetBinding; - std::string name; - bool persist; - bool consume; + std::string name; + bool persist; + bool consume; }; inline std::unique_ptr> g_pSubmaps; diff --git a/src/managers/KeybindManager.hpp b/src/managers/KeybindManager.hpp index 5ed36731bc1..459629d776b 100644 --- a/src/managers/KeybindManager.hpp +++ b/src/managers/KeybindManager.hpp @@ -28,8 +28,7 @@ struct SKeybind { bool shadowed = false; }; -enum eFocusWindowMode -{ +enum eFocusWindowMode { MODE_CLASS_REGEX = 0, MODE_TITLE_REGEX, MODE_ADDRESS, @@ -63,34 +62,34 @@ class CKeybindManager { std::list m_lKeybinds; private: - std::deque m_dPressedKeysyms; - std::deque m_dPressedKeycodes; + std::deque m_dPressedKeysyms; + std::deque m_dPressedKeycodes; - inline static SubmapOptions* m_szCurrentSelectedSubmap = nullptr; + inline static SubmapOptions* m_szCurrentSelectedSubmap = nullptr; - SKeybind* m_pActiveKeybind = nullptr; + SKeybind* m_pActiveKeybind = nullptr; - 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; - bool m_bIsMouseBindActive = false; + bool m_bIsMouseBindActive = false; - int m_iPassPressed = -1; // used for pass + int m_iPassPressed = -1; // used for pass - CTimer m_tScrollTimer; + CTimer m_tScrollTimer; - bool handleKeybinds(const uint32_t&, const std::string&, const xkb_keysym_t&, const int&, bool, uint32_t); + bool handleKeybinds(const uint32_t&, const std::string&, const xkb_keysym_t&, const int&, bool, uint32_t); - 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(CMonitor* monitor); + static bool tryMoveFocusToMonitor(CMonitor* monitor); // -------------- Dispatchers -------------- // static void killActive(std::string);