From 5edc32930d85f5f481160b938965c8bc329487e7 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Tue, 30 Apr 2024 02:41:27 +0100 Subject: layerSurface: refactor/move to a memory-safe impl Makes all the pointers smart to avoid memory issues Refactors layerSurface code to live inside desktop/layersurface --- src/config/ConfigManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/config/ConfigManager.cpp') diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 4a03b180..e73f6284 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -1177,7 +1177,7 @@ std::vector CConfigManager::getMatchingRules(PHLWINDOW pWindow, boo return returns; } -std::vector CConfigManager::getMatchingRules(SLayerSurface* pLS) { +std::vector CConfigManager::getMatchingRules(PHLLS pLS) { std::vector returns; if (!pLS->layerSurface || pLS->fadingOut) @@ -1185,7 +1185,7 @@ std::vector CConfigManager::getMatchingRules(SLayerSurface* pLS) { for (auto& lr : m_dLayerRules) { if (lr.targetNamespace.starts_with("address:0x")) { - if (std::format("address:0x{:x}", (uintptr_t)pLS) != lr.targetNamespace) + if (std::format("address:0x{:x}", (uintptr_t)pLS.get()) != lr.targetNamespace) continue; } else { std::regex NSCHECK(lr.targetNamespace); -- cgit v1.2.3