aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/desktop/WindowRule.hpp
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-12-21 19:21:45 +0000
committerVaxry <[email protected]>2024-12-21 19:21:50 +0000
commit57921d7dbd1b87a9474f609cb9cd30e6174027cd (patch)
treef25c16ad3e24449ca2b7b94e82313f08fb116082 /src/desktop/WindowRule.hpp
parent8e8073c42172feaf5600879f475322ab7363f017 (diff)
downloadHyprland-57921d7dbd1b87a9474f609cb9cd30e6174027cd.tar.gz
Hyprland-57921d7dbd1b87a9474f609cb9cd30e6174027cd.zip
windowrules: precompute regexes for window/layer rules
Diffstat (limited to 'src/desktop/WindowRule.hpp')
-rw-r--r--src/desktop/WindowRule.hpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/desktop/WindowRule.hpp b/src/desktop/WindowRule.hpp
index 6faf8b5a..3ce31179 100644
--- a/src/desktop/WindowRule.hpp
+++ b/src/desktop/WindowRule.hpp
@@ -2,6 +2,12 @@
#include <string>
#include <cstdint>
+#include <memory>
+
+//NOLINTNEXTLINE
+namespace re2 {
+ class RE2;
+};
class CWindowRule {
public:
@@ -57,4 +63,11 @@ class CWindowRule {
std::string szFullscreenState = ""; // empty means any
std::string szOnWorkspace = ""; // empty means any
std::string szWorkspace = ""; // empty means any
+
+ // precompiled regexes
+ std::unique_ptr<re2::RE2> rTitle;
+ std::unique_ptr<re2::RE2> rClass;
+ std::unique_ptr<re2::RE2> rInitialTitle;
+ std::unique_ptr<re2::RE2> rInitialClass;
+ std::unique_ptr<re2::RE2> rV1Regex;
}; \ No newline at end of file