forked from quickshell/quickshell
fix(slock): fix lock target when attempting to enable multiple locks
This commit is contained in:
parent
b05d98b56d
commit
a255889e5c
|
@ -46,7 +46,7 @@ void SessionLock::onReload(QObject* oldInstance) {
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
if (this->lockTarget) {
|
if (this->lockTarget) {
|
||||||
this->manager->lock();
|
if (!this->manager->lock()) this->lockTarget = false;
|
||||||
this->updateSurfaces(old);
|
this->updateSurfaces(old);
|
||||||
} else {
|
} else {
|
||||||
this->setLocked(false);
|
this->setLocked(false);
|
||||||
|
@ -133,7 +133,7 @@ void SessionLock::setLocked(bool locked) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (locked) {
|
if (locked) {
|
||||||
this->manager->lock();
|
if (!this->manager->lock()) this->lockTarget = false;
|
||||||
this->updateSurfaces();
|
this->updateSurfaces();
|
||||||
if (this->lockTarget) emit this->lockStateChanged();
|
if (this->lockTarget) emit this->lockStateChanged();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue