summaryrefslogtreecommitdiff
path: root/src/managers/SessionLockManager.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-03-03 18:39:20 +0000
committerVaxry <vaxry@vaxry.net>2024-03-03 18:41:38 +0000
commit063708df26e8b930f492200e1907eb47950f50e6 (patch)
tree31648b7148213ecb9c6d469148ac1c5061835d5a /src/managers/SessionLockManager.cpp
parent8ccbd272cc5f3a98280d4e050f456d25aee47ee5 (diff)
config: improve config value infrastructure
Diffstat (limited to 'src/managers/SessionLockManager.cpp')
-rw-r--r--src/managers/SessionLockManager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/managers/SessionLockManager.cpp b/src/managers/SessionLockManager.cpp
index 89c08566..82606a8a 100644
--- a/src/managers/SessionLockManager.cpp
+++ b/src/managers/SessionLockManager.cpp
@@ -1,5 +1,6 @@
#include "SessionLockManager.hpp"
#include "../Compositor.hpp"
+#include "../config/ConfigValue.hpp"
static void handleSurfaceMap(void* owner, void* data) {
const auto PSURFACE = (SSessionLockSurface*)owner;
@@ -44,9 +45,9 @@ static void handleSurfaceDestroy(void* owner, void* data) {
void CSessionLockManager::onNewSessionLock(wlr_session_lock_v1* pWlrLock) {
- static auto* const PALLOWRELOCK = (Hyprlang::INT* const*)g_pConfigManager->getConfigValuePtr("misc:allow_session_lock_restore");
+ static auto PALLOWRELOCK = CConfigValue<Hyprlang::INT>("misc:allow_session_lock_restore");
- if (m_sSessionLock.active && (!**PALLOWRELOCK || m_sSessionLock.pWlrLock)) {
+ if (m_sSessionLock.active && (!*PALLOWRELOCK || m_sSessionLock.pWlrLock)) {
Debug::log(LOG, "Attempted to lock a locked session!");
wlr_session_lock_v1_destroy(pWlrLock);
return;