From 5dcbce550f0247583789ced52c5ea0bcbde3fc35 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Wed, 3 Aug 2022 21:19:12 +0200 Subject: [PATCH] only ensure DPMS in hyprctl monitors --- src/config/ConfigManager.cpp | 2 +- src/config/ConfigManager.hpp | 2 +- src/debug/HyprCtl.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 8e004790..cbef44f3 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -1314,7 +1314,7 @@ void CConfigManager::ensureDPMS() { auto rule = getMonitorRuleFor(rm->szName); if (rule.disabled == rm->m_bEnabled) { - rm->m_pThisWrap = &rm; + rm->m_pThisWrap = &rm; g_pHyprRenderer->applyMonitorRule(rm.get(), &rule); } } diff --git a/src/config/ConfigManager.hpp b/src/config/ConfigManager.hpp index c34e0951..18079356 100644 --- a/src/config/ConfigManager.hpp +++ b/src/config/ConfigManager.hpp @@ -96,6 +96,7 @@ public: void performMonitorReload(); bool m_bWantsMonitorReload = false; bool m_bForceReload = false; + void ensureDPMS(); std::string parseKeyword(const std::string&, const std::string&, bool dynamic = false); @@ -131,7 +132,6 @@ private: void setDefaultVars(); void setDefaultAnimationVars(); void setDeviceDefaultVars(const std::string&); - void ensureDPMS(); void setAnimForChildren(SAnimationPropertyConfig *const); diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index 6422c9d8..24bdf14d 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -591,7 +591,7 @@ void HyprCtl::tickHyprCtl() { requestReady = true; if (g_pConfigManager->m_bWantsMonitorReload) { - g_pConfigManager->performMonitorReload(); // will unset + g_pConfigManager->ensureDPMS(); } }