wayland/lock: initialize lock content before starting lock

Reduces any chances of the compositor displaying a blank frame first.
This commit is contained in:
outfoxxed 2024-06-18 20:34:16 -07:00
parent 71a65c4d3c
commit 8ec245ac66
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
4 changed files with 79 additions and 57 deletions

View file

@ -63,6 +63,8 @@ LockWindowExtension* LockWindowExtension::get(QWindow* window) {
}
}
bool LockWindowExtension::isAttached() const { return this->surface != nullptr; }
bool LockWindowExtension::attach(QWindow* window, SessionLockManager* manager) {
if (this->surface != nullptr)
qFatal() << "Cannot change the attached window of a LockWindowExtension";