diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-07-27 12:32:00 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-07-27 12:32:00 +0200 |
| commit | 31a079b347ddede3f672b0b059967f5e6bc74a36 (patch) | |
| tree | c957d8af9866189dbaaa71f4481e13e860ff640c /src/config/ConfigManager.cpp | |
| parent | 50b991674b6d6607477232a774d5f730789d18a8 (diff) | |
added DPMS
Diffstat (limited to 'src/config/ConfigManager.cpp')
| -rw-r--r-- | src/config/ConfigManager.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 1b639791..ed4511c6 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -958,6 +958,9 @@ void CConfigManager::loadConfigLoadVars() { // and they'll be taken care of in the newMonitor event if (!isFirstLaunch) { m_bWantsMonitorReload = true; + + // check + ensureDPMS(); } // Update window border colors @@ -1212,3 +1215,14 @@ bool CConfigManager::shouldBlurLS(const std::string& ns) { return false; } + +void CConfigManager::ensureDPMS() { + for (auto& rm : g_pCompositor->m_vRealMonitors) { + auto rule = getMonitorRuleFor(rm->szName); + + if (rule.disabled == rm->m_bEnabled) { + rm->m_pThisWrap = &rm; + g_pHyprRenderer->applyMonitorRule(rm.get(), &rule); + } + } +} |
