mirror of
https://github.com/hyprwm/hyprlock.git
synced 2025-05-13 05:40:42 +01:00
core: use enqueueUnlock for unlocks via SIGUSR1
This commit is contained in:
parent
82808290d9
commit
dd196f6ed5
2 changed files with 3 additions and 3 deletions
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue