From a255889e5cc71582bdd7d77b89c3c8a0bfaccc49 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Wed, 28 Feb 2024 23:02:53 -0800 Subject: [PATCH] fix(slock): fix lock target when attempting to enable multiple locks --- src/wayland/session_lock.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 {