mirror of
https://github.com/hyprwm/hyprlock.git
synced 2024-11-16 15:05:57 +01:00
core: make sure m_sLockState.lock is present in onLockFinished and releaseSessionLock (#432)
This commit is contained in:
parent
372a4cd55e
commit
20c01d91d4
1 changed files with 12 additions and 1 deletions
|
@ -941,11 +941,16 @@ void CHyprlock::acquireSessionLock() {
|
|||
|
||||
void CHyprlock::releaseSessionLock() {
|
||||
Debug::log(LOG, "Unlocking session");
|
||||
if (m_bTerminate && !m_sLockState.lock) {
|
||||
if (m_bTerminate) {
|
||||
Debug::log(ERR, "Unlock already happend?");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!m_sLockState.lock) {
|
||||
Debug::log(ERR, "Unlock without a lock object!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!m_bLocked) {
|
||||
// Would be a protocol error to allow this
|
||||
Debug::log(ERR, "Trying to unlock the session, but never recieved the locked event!");
|
||||
|
@ -977,6 +982,12 @@ void CHyprlock::onLockLocked() {
|
|||
|
||||
void CHyprlock::onLockFinished() {
|
||||
Debug::log(LOG, "onLockFinished called. Seems we got yeeten. Is another lockscreen running?");
|
||||
|
||||
if (!m_sLockState.lock) {
|
||||
Debug::log(ERR, "onLockFinished without a lock object!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_bLocked)
|
||||
// The `finished` event specifies that whenever the `locked` event has been recieved and the compositor sends `finished`,
|
||||
// `unlock_and_destroy` should be called by the client.
|
||||
|
|
Loading…
Reference in a new issue