diff --git a/src/auth/GreetdLogin.cpp b/src/auth/GreetdLogin.cpp index 974d98d..11e4dec 100644 --- a/src/auth/GreetdLogin.cpp +++ b/src/auth/GreetdLogin.cpp @@ -220,7 +220,7 @@ void CGreetdLogin::handleResponse(const VGreetdRequest& request, const VGreetdRe } void CGreetdLogin::startSessionAfterSuccess() { - const auto SELECTEDSESSION = g_pLoginSessionManager->getSelectedLoginSession(); + const auto SELECTEDSESSION = g_loginSessionManager->getSelectedLoginSession(); Hyprutils::String::CVarList args(SELECTEDSESSION.exec, 0, ' '); SGreetdStartSession startSession; diff --git a/src/config/LoginSessionManager.hpp b/src/config/LoginSessionManager.hpp index ac3c583..f48fdbd 100644 --- a/src/config/LoginSessionManager.hpp +++ b/src/config/LoginSessionManager.hpp @@ -33,4 +33,4 @@ class CLoginSessionManager { void selectDefaultSession(); }; -inline UP g_pLoginSessionManager; +inline UP g_loginSessionManager; diff --git a/src/core/hyprlock.cpp b/src/core/hyprlock.cpp index fb47d43..012c7de 100644 --- a/src/core/hyprlock.cpp +++ b/src/core/hyprlock.cpp @@ -326,7 +326,7 @@ void CHyprlock::run() { g_pRenderer = makeUnique(); g_asyncResourceManager = makeUnique(); - g_pLoginSessionManager = makeUnique(); + g_loginSessionManager = makeUnique(); g_pAuth = makeUnique(m_greetdLogin); g_pAuth->start(); @@ -336,7 +336,7 @@ void CHyprlock::run() { g_asyncResourceManager->enqueueScreencopyFrames(); if (m_greetdLogin) - g_pLoginSessionManager->gather(m_greetdSessionDirs); + g_loginSessionManager->gather(m_greetdSessionDirs); Log::logger->log(Log::INFO, "Running on {}", m_currentDesktop); @@ -656,9 +656,9 @@ void CHyprlock::handleKeySym(xkb_keysym_t sym, bool composed) { else if (SYM == XKB_KEY_Num_Lock) m_bNumLock = !m_bNumLock; else if (SYM == XKB_KEY_Up && m_greetdLogin) - g_pLoginSessionManager->handleKeyUp(); + g_loginSessionManager->handleKeyUp(); else if (SYM == XKB_KEY_Down && m_greetdLogin) - g_pLoginSessionManager->handleKeyDown(); + g_loginSessionManager->handleKeyDown(); else { char buf[16] = {0}; int len = (composed) ? xkb_compose_state_get_utf8(g_pSeatManager->m_pXKBComposeState, buf, sizeof(buf)) /* nullbyte */ + 1 : diff --git a/src/renderer/widgets/SessionPicker.cpp b/src/renderer/widgets/SessionPicker.cpp index 07754be..7394de8 100644 --- a/src/renderer/widgets/SessionPicker.cpp +++ b/src/renderer/widgets/SessionPicker.cpp @@ -57,7 +57,7 @@ void CSessionPicker::configure(const std::unordered_map& } void CSessionPicker::requestSessionEntryTexts() { - const auto LOGINSESSIONS = g_pLoginSessionManager->getLoginSessions(); + const auto LOGINSESSIONS = g_loginSessionManager->getLoginSessions(); m_loginSessions.resize(LOGINSESSIONS.size()); for (size_t i = 0; i < LOGINSESSIONS.size(); i++) { @@ -97,7 +97,7 @@ bool CSessionPicker::draw(const SRenderData& data) { if (std::ranges::any_of(m_loginSessions, [](const auto& sessionEntry) { return sessionEntry.m_textAsset == nullptr; })) return false; // rely on callback - const size_t SELECTEDENTRYINDEX = g_pLoginSessionManager->getSelectedLoginSessionIndex(); + const size_t SELECTEDENTRYINDEX = g_loginSessionManager->getSelectedLoginSessionIndex(); const double PAD = m_biggestEntryAssetSize.y / 2; const Vector2D SIZE{ @@ -165,7 +165,7 @@ void CSessionPicker::onClick(uint32_t button, bool down, const Vector2D& pos) { const auto DIFFERENTIAL = pos.y - (m_viewport.y - m_box.pos().y - m_box.size().y); const auto HEIGHTPERENTRY = m_box.size().y / m_loginSessions.size(); const size_t SELECTEDENTRY = std::floor(DIFFERENTIAL / HEIGHTPERENTRY); - g_pLoginSessionManager->selectSession(SELECTEDENTRY); + g_loginSessionManager->selectSession(SELECTEDENTRY); g_pHyprlock->renderAllOutputs(); }