aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/config
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-10-19 23:03:29 +0100
committerGitHub <[email protected]>2024-10-19 23:03:29 +0100
commitf044e4c9514ec89c4c1fc8a523ca90b8cb907fb7 (patch)
tree5fa2ba17c08d522b7bb3f6564761b4aaedc532d0 /src/config
parentce3ba798df6bca5be1da4396644a9ef08a2acab4 (diff)
downloadHyprland-f044e4c9514ec89c4c1fc8a523ca90b8cb907fb7.tar.gz
Hyprland-f044e4c9514ec89c4c1fc8a523ca90b8cb907fb7.zip
internal: Move CMonitor to SP (#8178)
* move monitors to sp * XD
Diffstat (limited to 'src/config')
-rw-r--r--src/config/ConfigManager.cpp16
-rw-r--r--src/config/ConfigManager.hpp4
2 files changed, 10 insertions, 10 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index 432b7faf..f16ebe46 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -943,9 +943,9 @@ void CConfigManager::postConfigReload(const Hyprlang::CParseResult& result) {
for (auto const& m : g_pCompositor->m_vMonitors) {
// mark blur dirty
- g_pHyprOpenGL->markBlurDirtyForMonitor(m.get());
+ g_pHyprOpenGL->markBlurDirtyForMonitor(m);
- g_pCompositor->scheduleFrameForMonitor(m.get());
+ g_pCompositor->scheduleFrameForMonitor(m);
// Force the compositor to fully re-render all monitors
m->forceFullFrames = 2;
@@ -1506,7 +1506,7 @@ void CConfigManager::performMonitorReload() {
auto rule = getMonitorRuleFor(m);
- if (!g_pHyprRenderer->applyMonitorRule(m.get(), &rule)) {
+ if (!g_pHyprRenderer->applyMonitorRule(m, &rule)) {
overAgain = true;
break;
}
@@ -1564,14 +1564,14 @@ void CConfigManager::ensureMonitorStatus() {
auto rule = getMonitorRuleFor(rm);
if (rule.disabled == rm->m_bEnabled)
- g_pHyprRenderer->applyMonitorRule(rm.get(), &rule);
+ g_pHyprRenderer->applyMonitorRule(rm, &rule);
}
}
-void CConfigManager::ensureVRR(CMonitor* pMonitor) {
+void CConfigManager::ensureVRR(PHLMONITOR pMonitor) {
static auto PVRR = reinterpret_cast<Hyprlang::INT* const*>(getConfigValuePtr("misc:vrr"));
- static auto ensureVRRForDisplay = [&](CMonitor* m) -> void {
+ static auto ensureVRRForDisplay = [&](PHLMONITOR m) -> void {
if (!m->output || m->createdByUser)
return;
@@ -1641,7 +1641,7 @@ void CConfigManager::ensureVRR(CMonitor* pMonitor) {
}
for (auto const& m : g_pCompositor->m_vMonitors) {
- ensureVRRForDisplay(m.get());
+ ensureVRRForDisplay(m);
}
}
@@ -1653,7 +1653,7 @@ void CConfigManager::addParseError(const std::string& err) {
g_pHyprError->queueCreate(err + "\nHyprland may not work correctly.", CColor(1.0, 50.0 / 255.0, 50.0 / 255.0, 1.0));
}
-CMonitor* CConfigManager::getBoundMonitorForWS(const std::string& wsname) {
+PHLMONITOR CConfigManager::getBoundMonitorForWS(const std::string& wsname) {
auto monitor = getBoundMonitorStringForWS(wsname);
if (monitor.substr(0, 5) == "desc:")
return g_pCompositor->getMonitorFromDesc(monitor.substr(5));
diff --git a/src/config/ConfigManager.hpp b/src/config/ConfigManager.hpp
index 2134acf4..e9ed2d64 100644
--- a/src/config/ConfigManager.hpp
+++ b/src/config/ConfigManager.hpp
@@ -173,7 +173,7 @@ class CConfigManager {
SWorkspaceRule getWorkspaceRuleFor(PHLWORKSPACE workspace);
std::string getDefaultWorkspaceFor(const std::string&);
- CMonitor* getBoundMonitorForWS(const std::string&);
+ PHLMONITOR getBoundMonitorForWS(const std::string&);
std::string getBoundMonitorStringForWS(const std::string&);
const std::deque<SWorkspaceRule>& getAllWorkspaceRules();
@@ -198,7 +198,7 @@ class CConfigManager {
void appendMonitorRule(const SMonitorRule&);
bool replaceMonitorRule(const SMonitorRule&);
void ensureMonitorStatus();
- void ensureVRR(CMonitor* pMonitor = nullptr);
+ void ensureVRR(PHLMONITOR pMonitor = nullptr);
std::string parseKeyword(const std::string&, const std::string&);