summaryrefslogtreecommitdiff
path: root/src/config/ConfigManager.cpp
diff options
context:
space:
mode:
authordavc0n <dconti.dev@gmail.com>2025-04-22 15:23:29 +0200
committerGitHub <noreply@github.com>2025-04-22 15:23:29 +0200
commit241a4935a244f403fa7108259075b04c81ed258f (patch)
tree50cc20b69c522c2be5396417931f799cac87138d /src/config/ConfigManager.cpp
parent3577a6be31fa26539b4088ea07aa2221f84b132e (diff)
compositor: refactor class member vars (#10141)
Diffstat (limited to 'src/config/ConfigManager.cpp')
-rw-r--r--src/config/ConfigManager.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index a6731f07..4bd00c99 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -793,7 +793,7 @@ CConfigManager::CConfigManager() {
if (CONFIG_OPTIONS.size() != m_configValueNumber - 1 /* autogenerated is special */)
Debug::log(LOG, "Warning: config descriptions have {} entries, but there are {} config values. This should fail tests!!", CONFIG_OPTIONS.size(), m_configValueNumber);
- if (!g_pCompositor->m_bOnlyConfigVerification) {
+ if (!g_pCompositor->m_onlyConfigVerification) {
Debug::log(
INFO,
"!!!!HEY YOU, YES YOU!!!!: further logs to stdout / logfile are disabled by default. BEFORE SENDING THIS LOG, ENABLE THEM. Use debug:disable_logs = false to do so: "
@@ -987,11 +987,11 @@ void CConfigManager::postConfigReload(const Hyprlang::CParseResult& result) {
updateWatcher();
- for (auto const& w : g_pCompositor->m_vWindows) {
+ for (auto const& w : g_pCompositor->m_windows) {
w->uncacheWindowDecos();
}
- for (auto const& m : g_pCompositor->m_vMonitors)
+ for (auto const& m : g_pCompositor->m_monitors)
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(m->ID);
// Update the keyboard layout to the cfg'd one if this is not the first launch
@@ -1037,23 +1037,23 @@ void CConfigManager::postConfigReload(const Hyprlang::CParseResult& result) {
}
#ifndef NO_XWAYLAND
- const auto PENABLEXWAYLAND = std::any_cast<Hyprlang::INT>(m_config->getConfigValue("xwayland:enabled"));
- g_pCompositor->m_bWantsXwayland = PENABLEXWAYLAND;
+ const auto PENABLEXWAYLAND = std::any_cast<Hyprlang::INT>(m_config->getConfigValue("xwayland:enabled"));
+ g_pCompositor->m_wantsXwayland = PENABLEXWAYLAND;
// enable/disable xwayland usage
if (!m_isFirstLaunch &&
g_pXWayland /* XWayland has to be initialized by CCompositor::initManagers for this to make sense, and it doesn't have to be (e.g. very early plugin load) */) {
bool prevEnabledXwayland = g_pXWayland->enabled();
- if (g_pCompositor->m_bWantsXwayland != prevEnabledXwayland)
- g_pXWayland = makeUnique<CXWayland>(g_pCompositor->m_bWantsXwayland);
+ if (g_pCompositor->m_wantsXwayland != prevEnabledXwayland)
+ g_pXWayland = makeUnique<CXWayland>(g_pCompositor->m_wantsXwayland);
} else
- g_pCompositor->m_bWantsXwayland = PENABLEXWAYLAND;
+ g_pCompositor->m_wantsXwayland = PENABLEXWAYLAND;
#endif
- if (!m_isFirstLaunch && !g_pCompositor->m_bUnsafeState)
+ if (!m_isFirstLaunch && !g_pCompositor->m_unsafeState)
refreshGroupBarGradients();
// Updates dynamic window and workspace rules
- for (auto const& w : g_pCompositor->m_vWorkspaces) {
+ for (auto const& w : g_pCompositor->m_workspaces) {
if (w->inert())
continue;
w->updateWindows();
@@ -1082,7 +1082,7 @@ void CConfigManager::postConfigReload(const Hyprlang::CParseResult& result) {
Debug::m_coloredLogs = reinterpret_cast<int64_t* const*>(m_config->getConfigValuePtr("debug:colored_stdout_logs")->getDataStaticPtr());
- for (auto const& m : g_pCompositor->m_vMonitors) {
+ for (auto const& m : g_pCompositor->m_monitors) {
// mark blur dirty
g_pHyprOpenGL->markBlurDirtyForMonitor(m);
@@ -1132,7 +1132,7 @@ std::string CConfigManager::parseKeyword(const std::string& COMMAND, const std::
// invalidate layouts if they changed
if (COMMAND == "monitor" || COMMAND.contains("gaps_") || COMMAND.starts_with("dwindle:") || COMMAND.starts_with("master:")) {
- for (auto const& m : g_pCompositor->m_vMonitors)
+ for (auto const& m : g_pCompositor->m_monitors)
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(m->ID);
}
@@ -1371,7 +1371,7 @@ std::vector<SP<CWindowRule>> CConfigManager::getMatchingRules(PHLWINDOW pWindow,
}
if (rule->bFocus != -1) {
- if (rule->bFocus != (g_pCompositor->m_pLastWindow.lock() == pWindow))
+ if (rule->bFocus != (g_pCompositor->m_lastWindow.lock() == pWindow))
continue;
}
@@ -1530,7 +1530,7 @@ void CConfigManager::dispatchExecOnce() {
return;
// update dbus env
- if (g_pCompositor->m_pAqBackend->hasSession())
+ if (g_pCompositor->m_aqBackend->hasSession())
handleRawExec("",
#ifdef USES_SYSTEMD
"systemctl --user import-environment DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP QT_QPA_PLATFORMTHEME PATH XDG_DATA_DIRS && hash "
@@ -1560,11 +1560,11 @@ void CConfigManager::dispatchExecOnce() {
void CConfigManager::dispatchExecShutdown() {
if (m_finalExecRequests.empty()) {
- g_pCompositor->m_bFinalRequests = false;
+ g_pCompositor->m_finalRequests = false;
return;
}
- g_pCompositor->m_bFinalRequests = true;
+ g_pCompositor->m_finalRequests = true;
for (auto const& c : m_finalExecRequests) {
handleExecShutdown("", c);
@@ -1580,7 +1580,7 @@ void CConfigManager::performMonitorReload() {
bool overAgain = false;
- for (auto const& m : g_pCompositor->m_vRealMonitors) {
+ for (auto const& m : g_pCompositor->m_realMonitors) {
if (!m->output || m->isUnsafeFallback)
continue;
@@ -1637,7 +1637,7 @@ bool CConfigManager::shouldBlurLS(const std::string& ns) {
}
void CConfigManager::ensureMonitorStatus() {
- for (auto const& rm : g_pCompositor->m_vRealMonitors) {
+ for (auto const& rm : g_pCompositor->m_realMonitors) {
if (!rm->output || rm->isUnsafeFallback)
continue;
@@ -1719,7 +1719,7 @@ void CConfigManager::ensureVRR(PHLMONITOR pMonitor) {
return;
}
- for (auto const& m : g_pCompositor->m_vMonitors) {
+ for (auto const& m : g_pCompositor->m_monitors) {
ensureVRRForDisplay(m);
}
}
@@ -1870,7 +1870,7 @@ std::optional<std::string> CConfigManager::handleExecRawOnce(const std::string&
}
std::optional<std::string> CConfigManager::handleExecShutdown(const std::string& command, const std::string& args) {
- if (g_pCompositor->m_bFinalRequests) {
+ if (g_pCompositor->m_finalRequests) {
g_pKeybindManager->spawn(args);
return {};
}
@@ -2616,7 +2616,7 @@ std::optional<std::string> CConfigManager::handleLayerRule(const std::string& co
m_layerRules.emplace_back(rule);
- for (auto const& m : g_pCompositor->m_vMonitors)
+ for (auto const& m : g_pCompositor->m_monitors)
for (auto const& lsl : m->m_aLayerSurfaceLayers)
for (auto const& ls : lsl)
ls->applyRules();
@@ -2631,7 +2631,7 @@ void CConfigManager::updateBlurredLS(const std::string& name, const bool forceBl
if (BYADDRESS)
matchName = matchName.substr(8);
- for (auto const& m : g_pCompositor->m_vMonitors) {
+ for (auto const& m : g_pCompositor->m_monitors) {
for (auto const& lsl : m->m_aLayerSurfaceLayers) {
for (auto const& ls : lsl) {
if (BYADDRESS) {