core: don't attempt to unlock when we are not locked yet (#661)

This commit is contained in:
Maximilian Seidler 2025-01-25 20:43:21 +00:00 committed by GitHub
parent 408ce95dd0
commit e77bc92b99
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -518,6 +518,11 @@ void CHyprlock::run() {
}
void CHyprlock::unlock() {
if (!m_bLocked) {
Debug::log(WARN, "Unlock called, but not locked yet. This can happen when dpms is off during the grace period.");
return;
}
const bool IMMEDIATE = m_sCurrentDesktop != "Hyprland";
g_pRenderer->startFadeOut(true, IMMEDIATE);