forked from quickshell/quickshell
feat(slock): implement ext_session_lock_v1 backend
note: did not run lints or fully test yet
This commit is contained in:
parent
70c5cf1e16
commit
1fa87b7c5a
12 changed files with 525 additions and 1 deletions
22
src/wayland/session_lock/manager.cpp
Normal file
22
src/wayland/session_lock/manager.cpp
Normal 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; }
|
||||
Loading…
Add table
Add a link
Reference in a new issue