aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2023-03-17 23:33:03 +0000
committervaxerski <[email protected]>2023-03-17 23:33:03 +0000
commitd797d9905d8963bac9d2b4903f94d65e5ea4ed82 (patch)
tree160678009948c470637cd07bf62b7f17e1502be9
parente5870d47c74150aa744ed55f9b7e58713d968209 (diff)
downloadHyprland-d797d9905d8963bac9d2b4903f94d65e5ea4ed82.tar.gz
Hyprland-d797d9905d8963bac9d2b4903f94d65e5ea4ed82.zip
LS: support address: in layerrules
-rw-r--r--src/config/ConfigManager.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index 2283ba08..9d17cfbe 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -1650,10 +1650,15 @@ std::vector<SLayerRule> CConfigManager::getMatchingRules(SLayerSurface* pLS) {
std::vector<SLayerRule> returns;
for (auto& lr : m_dLayerRules) {
- std::regex NSCHECK(lr.targetNamespace);
+ if (lr.targetNamespace.find("address:0x") == 0) {
+ if (getFormat("address:0x%x", pLS) != lr.targetNamespace)
+ continue;
+ } else {
+ std::regex NSCHECK(lr.targetNamespace);
- if (!pLS->layerSurface->_namespace || !std::regex_search(pLS->layerSurface->_namespace, NSCHECK))
- continue;
+ if (!pLS->layerSurface->_namespace || !std::regex_search(pLS->layerSurface->_namespace, NSCHECK))
+ continue;
+ }
// hit
returns.push_back(lr);