feat(slock): add user facing SessionLock and SessionLockSurface

This commit is contained in:
outfoxxed 2024-02-28 19:55:49 -08:00
parent 1fa87b7c5a
commit 48bdcf4db2
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
10 changed files with 458 additions and 14 deletions

View file

@ -40,7 +40,10 @@ QSWaylandSessionLockSurface::QSWaylandSessionLockSurface(QtWaylandClient::QWayla
this->init(this->ext->lock->get_lock_surface(window->waylandSurface()->object(), output));
}
QSWaylandSessionLockSurface::~QSWaylandSessionLockSurface() { this->destroy(); }
QSWaylandSessionLockSurface::~QSWaylandSessionLockSurface() {
if (this->ext != nullptr) this->ext->surface = nullptr;
this->destroy();
}
bool QSWaylandSessionLockSurface::isExposed() const { return this->configured; }
@ -60,7 +63,7 @@ bool QSWaylandSessionLockSurface::handleExpose(const QRegion& region) {
void QSWaylandSessionLockSurface::setExtension(LockWindowExtension* ext) {
if (ext == nullptr) {
this->window()->window()->close();
if (this->window() != nullptr) this->window()->window()->close();
} else {
if (this->ext != nullptr) {
this->ext->surface = nullptr;