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
27
src/wayland/session_lock/manager.hpp
Normal file
27
src/wayland/session_lock/manager.hpp
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#pragma once
|
||||
|
||||
#include <qtclasshelpermacros.h>
|
||||
#include <qwayland-ext-session-lock-v1.h>
|
||||
#include <qwaylandclientextension.h>
|
||||
|
||||
#include "lock.hpp"
|
||||
|
||||
class QSWaylandSessionLockManager
|
||||
: public QWaylandClientExtensionTemplate<QSWaylandSessionLockManager>
|
||||
, public QtWayland::ext_session_lock_manager_v1 {
|
||||
public:
|
||||
QSWaylandSessionLockManager();
|
||||
~QSWaylandSessionLockManager() override;
|
||||
Q_DISABLE_COPY_MOVE(QSWaylandSessionLockManager);
|
||||
|
||||
// Create a new session lock if there is no currently active lock, otherwise null.
|
||||
QSWaylandSessionLock* acquireLock();
|
||||
[[nodiscard]] bool isLocked() const;
|
||||
|
||||
static bool sessionLocked();
|
||||
|
||||
private:
|
||||
QSWaylandSessionLock* active = nullptr;
|
||||
|
||||
friend class QSWaylandSessionLock;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue