parent
c2670e9ab9
commit
37fe7b2efd
1 changed files with 24 additions and 2 deletions
|
|
@ -990,12 +990,34 @@ std::string CConfigManager::getErrors() {
|
||||||
return m_configErrors;
|
return m_configErrors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static std::vector<const char*> HL_VERSION_VARS = {
|
||||||
|
"HYPRLAND_V_0_53",
|
||||||
|
};
|
||||||
|
|
||||||
|
static void exportHlVersionVars() {
|
||||||
|
for (const auto& v : HL_VERSION_VARS) {
|
||||||
|
setenv(v, "1", 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void clearHlVersionVars() {
|
||||||
|
for (const auto& v : HL_VERSION_VARS) {
|
||||||
|
unsetenv(v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CConfigManager::reload() {
|
void CConfigManager::reload() {
|
||||||
EMIT_HOOK_EVENT("preConfigReload", nullptr);
|
EMIT_HOOK_EVENT("preConfigReload", nullptr);
|
||||||
setDefaultAnimationVars();
|
setDefaultAnimationVars();
|
||||||
resetHLConfig();
|
resetHLConfig();
|
||||||
m_configCurrentPath = getMainConfigPath();
|
m_configCurrentPath = getMainConfigPath();
|
||||||
const auto ERR = m_config->parse();
|
|
||||||
|
exportHlVersionVars();
|
||||||
|
|
||||||
|
const auto ERR = m_config->parse();
|
||||||
|
|
||||||
|
clearHlVersionVars();
|
||||||
|
|
||||||
const auto monitorError = handleMonitorv2();
|
const auto monitorError = handleMonitorv2();
|
||||||
const auto ruleError = reloadRules();
|
const auto ruleError = reloadRules();
|
||||||
m_lastConfigVerificationWasSuccessful = !ERR.error && !monitorError.error;
|
m_lastConfigVerificationWasSuccessful = !ERR.error && !monitorError.error;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue