summaryrefslogtreecommitdiff
path: root/src/managers
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2025-01-24 20:30:12 +0000
committerVaxry <vaxry@vaxry.net>2025-01-24 20:30:21 +0000
commitd8f79d7678f428738f3173020109bd7b7fbd0840 (patch)
tree8efc7a843e1f82cd7fcfb3c544124075a7d68782 /src/managers
parent80b2fd135b45f2c2e41ceb312314908f6a3e7b30 (diff)
core: add --verify-config to verify the config with Hyprland
fixes #9135
Diffstat (limited to 'src/managers')
-rw-r--r--src/managers/AnimationManager.cpp3
-rw-r--r--src/managers/KeybindManager.cpp7
2 files changed, 7 insertions, 3 deletions
diff --git a/src/managers/AnimationManager.cpp b/src/managers/AnimationManager.cpp
index f884acdd..964f7cfa 100644
--- a/src/managers/AnimationManager.cpp
+++ b/src/managers/AnimationManager.cpp
@@ -34,7 +34,8 @@ static int wlTick(SP<CEventLoopTimer> self, void* data) {
CHyprAnimationManager::CHyprAnimationManager() {
m_pAnimationTimer = SP<CEventLoopTimer>(new CEventLoopTimer(std::chrono::microseconds(500), wlTick, nullptr));
- g_pEventLoopManager->addTimer(m_pAnimationTimer);
+ if (g_pEventLoopManager) // null in --verify-config mode
+ g_pEventLoopManager->addTimer(m_pAnimationTimer);
addBezierWithName("linear", Vector2D(0.0, 0.0), Vector2D(1.0, 1.0));
}
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index 4706c1e1..e2191bc6 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -172,8 +172,11 @@ CKeybindManager::CKeybindManager() {
},
nullptr);
- g_pEventLoopManager->addTimer(m_pLongPressTimer);
- g_pEventLoopManager->addTimer(m_pRepeatKeyTimer);
+ // null in --verify-config mode
+ if (g_pEventLoopManager) {
+ g_pEventLoopManager->addTimer(m_pLongPressTimer);
+ g_pEventLoopManager->addTimer(m_pRepeatKeyTimer);
+ }
static auto P = g_pHookSystem->hookDynamic("configReloaded", [this](void* hk, SCallbackInfo& info, std::any param) {
// clear cuz realloc'd