core: use enqueueUnlock for unlocks via SIGUSR1 (#756)
Some checks failed
Build / nix (push) Has been cancelled

This commit is contained in:
Maximilian Seidler 2025-04-30 09:12:40 +02:00 committed by GitHub
parent 867a71dd78
commit 0e3e7206bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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();
}
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) {

View file

@ -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();
}
}