mirror of
https://github.com/hyprwm/hyprlock.git
synced 2026-05-19 19:28:08 +02:00
rename g_p global pointer
This commit is contained in:
parent
02066fea3b
commit
da52cc63be
4 changed files with 9 additions and 9 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -33,4 +33,4 @@ class CLoginSessionManager {
|
|||
void selectDefaultSession();
|
||||
};
|
||||
|
||||
inline UP<CLoginSessionManager> g_pLoginSessionManager;
|
||||
inline UP<CLoginSessionManager> g_loginSessionManager;
|
||||
|
|
|
|||
|
|
@ -326,7 +326,7 @@ void CHyprlock::run() {
|
|||
|
||||
g_pRenderer = makeUnique<CRenderer>();
|
||||
g_asyncResourceManager = makeUnique<CAsyncResourceManager>();
|
||||
g_pLoginSessionManager = makeUnique<CLoginSessionManager>();
|
||||
g_loginSessionManager = makeUnique<CLoginSessionManager>();
|
||||
g_pAuth = makeUnique<CAuth>(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 :
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ void CSessionPicker::configure(const std::unordered_map<std::string, std::any>&
|
|||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue