diff --git a/src/wayland/session_lock.cpp b/src/wayland/session_lock.cpp index a466e4d..fb8e515 100644 --- a/src/wayland/session_lock.cpp +++ b/src/wayland/session_lock.cpp @@ -46,7 +46,7 @@ void SessionLock::onReload(QObject* oldInstance) { // clang-format on if (this->lockTarget) { - this->manager->lock(); + if (!this->manager->lock()) this->lockTarget = false; this->updateSurfaces(old); } else { this->setLocked(false); @@ -133,7 +133,7 @@ void SessionLock::setLocked(bool locked) { } if (locked) { - this->manager->lock(); + if (!this->manager->lock()) this->lockTarget = false; this->updateSurfaces(); if (this->lockTarget) emit this->lockStateChanged(); } else {