mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-01 20:51:58 -07:00
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
This commit is contained in:
@@ -1177,7 +1177,7 @@ std::vector<SWindowRule> CConfigManager::getMatchingRules(PHLWINDOW pWindow, boo
|
||||
return returns;
|
||||
}
|
||||
|
||||
std::vector<SLayerRule> CConfigManager::getMatchingRules(SLayerSurface* pLS) {
|
||||
std::vector<SLayerRule> CConfigManager::getMatchingRules(PHLLS pLS) {
|
||||
std::vector<SLayerRule> returns;
|
||||
|
||||
if (!pLS->layerSurface || pLS->fadingOut)
|
||||
@@ -1185,7 +1185,7 @@ std::vector<SLayerRule> 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);
|
||||
|
Reference in New Issue
Block a user