From dd196f6ed58edba8e2e19e4da8411998d940b3db Mon Sep 17 00:00:00 2001 From: Maximilian Seidler Date: Fri, 25 Apr 2025 15:10:00 +0200 Subject: [PATCH] core: use enqueueUnlock for unlocks via SIGUSR1 --- src/auth/Auth.cpp | 4 ++-- src/core/hyprlock.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/auth/Auth.cpp b/src/auth/Auth.cpp index e7f075d..5d7eeff 100644 --- a/src/auth/Auth.cpp +++ b/src/auth/Auth.cpp @@ -76,12 +76,12 @@ void CAuth::terminate() { } } -static void passwordUnlockCallback(std::shared_ptr self, void* data) { +static void unlockCallback(std::shared_ptr self, void* data) { g_pHyprlock->unlock(); } void CAuth::enqueueUnlock() { - g_pHyprlock->addTimer(std::chrono::milliseconds(0), passwordUnlockCallback, nullptr); + g_pHyprlock->addTimer(std::chrono::milliseconds(0), unlockCallback, nullptr); } static void passwordFailCallback(std::shared_ptr self, void* data) { diff --git a/src/core/hyprlock.cpp b/src/core/hyprlock.cpp index 0ce0856..46d21fd 100644 --- a/src/core/hyprlock.cpp +++ b/src/core/hyprlock.cpp @@ -73,7 +73,7 @@ static void registerSignalAction(int sig, void (*handler)(int), int sa_flags = 0 static void handleUnlockSignal(int sig) { if (sig == SIGUSR1) { Debug::log(LOG, "Unlocking with a SIGUSR1"); - g_pHyprlock->releaseSessionLock(); + g_pAuth->enqueueUnlock(); } }