feat(slock): implement ext_session_lock_v1 backend

note: did not run lints or fully test yet
This commit is contained in:
outfoxxed 2024-02-28 04:37:52 -08:00
parent 70c5cf1e16
commit 1fa87b7c5a
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
12 changed files with 525 additions and 1 deletions

View file

@ -0,0 +1,22 @@
#include "manager.hpp"
#include <qdebug.h>
#include <qlogging.h>
#include <qwaylandclientextension.h>
#include "lock.hpp"
QSWaylandSessionLockManager::QSWaylandSessionLockManager()
: QWaylandClientExtensionTemplate<QSWaylandSessionLockManager>(1) {
this->initialize();
}
QSWaylandSessionLockManager::~QSWaylandSessionLockManager() { this->destroy(); }
QSWaylandSessionLock* QSWaylandSessionLockManager::acquireLock() {
if (this->isLocked()) return nullptr;
this->active = new QSWaylandSessionLock(this, this->lock());
return this->active;
}
bool QSWaylandSessionLockManager::isLocked() const { return this->active != nullptr; }