summaryrefslogtreecommitdiff
path: root/hyprtester/src/tests/main/window.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2026-03-07 19:53:34 +0000
committerGitHub <noreply@github.com>2026-03-07 19:53:34 +0000
commita4ecae91600d7e8ceb31610176d6b40cb816711b (patch)
treeb7753624381d474b04c4d7ac32e2be7544603a11 /hyprtester/src/tests/main/window.cpp
parent3cf62bea185384aa3c5442a2c5448ae1d62c9c0e (diff)
desktop/windowRule: fix matching CONTENT (#13636)
ref #13596
Diffstat (limited to 'hyprtester/src/tests/main/window.cpp')
-rw-r--r--hyprtester/src/tests/main/window.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/hyprtester/src/tests/main/window.cpp b/hyprtester/src/tests/main/window.cpp
index beac0298..9dadf3d5 100644
--- a/hyprtester/src/tests/main/window.cpp
+++ b/hyprtester/src/tests/main/window.cpp
@@ -658,6 +658,33 @@ static bool testWindowRuleWorkspaceEmpty() {
return true;
}
+static void testContentRules() {
+ NLog::log("{}Testing content window rules", Colors::YELLOW);
+
+ // kill me PLEASE
+
+ OK(getFromSocket("/keyword windowrule match:class kitty_bitch, content game"));
+ OK(getFromSocket("/keyword windowrule match:content game, border_size 10"));
+ OK(getFromSocket("/keyword windowrule match:content 3, opacity 0.5"));
+
+ getFromSocket("/dispatch workspace 420");
+
+ if (!spawnKitty("kitty_bitch")) {
+ NLog::log("{}Error: failed to spawn kitty", Colors::RED);
+ return;
+ }
+
+ {
+ auto res = getFromSocket("/getprop active border_size");
+ EXPECT_CONTAINS(res, "10");
+ }
+
+ {
+ auto res = getFromSocket("/getprop active opacity");
+ EXPECT_CONTAINS(res, "0.5");
+ }
+}
+
static bool test() {
NLog::log("{}Testing windows", Colors::GREEN);
@@ -1122,6 +1149,7 @@ static bool test() {
testWindowRuleFocusOnActivate();
testPinnedWorkspacesValid();
testWindowRuleWorkspaceEmpty();
+ testContentRules();
NLog::log("{}Reloading config", Colors::YELLOW);
OK(getFromSocket("/reload"));