Skip to content

Commit

Permalink
Run clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowmax31 committed Sep 8, 2023
1 parent 3d4a2c4 commit f8b8564
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 29 deletions.
2 changes: 1 addition & 1 deletion src/config/ConfigManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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("");
Expand Down
16 changes: 7 additions & 9 deletions src/config/SubmapManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -35,7 +34,7 @@ class SubmapOptions {
void setConsume(bool consume) {
this->consume = consume;
}

void setPersist(bool persist) {
this->persist = persist;
}
Expand All @@ -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<std::vector<SubmapOptions>> g_pSubmaps;
37 changes: 18 additions & 19 deletions src/managers/KeybindManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ struct SKeybind {
bool shadowed = false;
};

enum eFocusWindowMode
{
enum eFocusWindowMode {
MODE_CLASS_REGEX = 0,
MODE_TITLE_REGEX,
MODE_ADDRESS,
Expand Down Expand Up @@ -63,34 +62,34 @@ class CKeybindManager {
std::list<SKeybind> m_lKeybinds;

private:
std::deque<xkb_keysym_t> m_dPressedKeysyms;
std::deque<int> m_dPressedKeycodes;
std::deque<xkb_keysym_t> m_dPressedKeysyms;
std::deque<int> 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);
Expand Down

0 comments on commit f8b8564

Please sign in to comment.