wayland/lock: only update surfaces on screens changed if locked
Fixes crash when a WlSessionLock object exists but is unlocked and a screen is added or removed.
This commit is contained in:
parent
59cf60d83e
commit
72956185bd
|
@ -130,7 +130,11 @@ void WlSessionLock::unlock() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void WlSessionLock::onScreensChanged() { this->updateSurfaces(true); }
|
void WlSessionLock::onScreensChanged() {
|
||||||
|
if (this->manager != nullptr && this->manager->isLocked()) {
|
||||||
|
this->updateSurfaces(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool WlSessionLock::isLocked() const {
|
bool WlSessionLock::isLocked() const {
|
||||||
return this->manager == nullptr ? this->lockTarget : this->manager->isLocked();
|
return this->manager == nullptr ? this->lockTarget : this->manager->isLocked();
|
||||||
|
|
Loading…
Reference in a new issue