MCPcopy Create free account
hub / github.com/CuarzoSoftware/Louvre / LSessionLockManager

Method LSessionLockManager

src/lib/core/LSessionLockManager.cpp:10–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8using namespace Louvre;
9
10LSessionLockManager::LSessionLockManager(const void *params) noexcept : LFactoryObject(FactoryObjectType)
11{
12 assert(params != nullptr && "Invalid parameter passed to LSessionLockManager constructor.");
13 LSessionLockManager**ptr { (LSessionLockManager**) params };
14 assert(*ptr == nullptr && *ptr == compositor()->sessionLockManager() && "Only a single LSessionLockManager instance can exist.");
15 *ptr = this;
16
17 m_sessionLockRes.setOnDestroyCallback([this](auto)
18 {
19 if (m_state == Locked)
20 stateChanged();
21 });
22}
23
24LClient *LSessionLockManager::client() const noexcept
25{

Callers

nothing calls this directly

Calls 2

sessionLockManagerMethod · 0.80
setOnDestroyCallbackMethod · 0.80

Tested by

no test coverage detected