fix(slock): fix lock target when attempting to enable multiple locks

This commit is contained in:
outfoxxed 2024-02-28 23:02:53 -08:00
parent b05d98b56d
commit a255889e5c
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E

View file

@ -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 {