core: use enqueueUnlock for unlocks via SIGUSR1

This commit is contained in:
Maximilian Seidler 2025-04-25 15:10:00 +02:00
parent 82808290d9
commit dd196f6ed5
2 changed files with 3 additions and 3 deletions

View file

@ -76,12 +76,12 @@ void CAuth::terminate() {
} }
} }
static void passwordUnlockCallback(std::shared_ptr<CTimer> self, void* data) { static void unlockCallback(std::shared_ptr<CTimer> self, void* data) {
g_pHyprlock->unlock(); g_pHyprlock->unlock();
} }
void CAuth::enqueueUnlock() { 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<CTimer> self, void* data) { static void passwordFailCallback(std::shared_ptr<CTimer> self, void* data) {

View file

@ -73,7 +73,7 @@ static void registerSignalAction(int sig, void (*handler)(int), int sa_flags = 0
static void handleUnlockSignal(int sig) { static void handleUnlockSignal(int sig) {
if (sig == SIGUSR1) { if (sig == SIGUSR1) {
Debug::log(LOG, "Unlocking with a SIGUSR1"); Debug::log(LOG, "Unlocking with a SIGUSR1");
g_pHyprlock->releaseSessionLock(); g_pAuth->enqueueUnlock();
} }
} }