summaryrefslogtreecommitdiff
path: root/hyprtester
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2026-01-01 21:49:57 +0100
committerGitHub <noreply@github.com>2026-01-01 21:49:57 +0100
commit31d3181e1ee91e338fb4fb8207d64b8d689310fc (patch)
tree71b00156665fe38d755f130712156e5537220ee5 /hyprtester
parent9b93d621b1019e8378b8a902edb7ba8dd8baf204 (diff)
dekstop/window: read static rules before guessing initial size if possible (#12783)
Diffstat (limited to 'hyprtester')
-rw-r--r--hyprtester/src/tests/main/window.cpp37
1 files changed, 34 insertions, 3 deletions
diff --git a/hyprtester/src/tests/main/window.cpp b/hyprtester/src/tests/main/window.cpp
index 0a2e31d0..fbaffa18 100644
--- a/hyprtester/src/tests/main/window.cpp
+++ b/hyprtester/src/tests/main/window.cpp
@@ -447,6 +447,39 @@ static void testBringActiveToTopMouseMovement() {
Tests::killAllWindows();
}
+static void testInitialFloatSize() {
+ NLog::log("{}Testing initial float size", Colors::GREEN);
+
+ Tests::killAllWindows();
+ OK(getFromSocket("/keyword windowrule match:class kitty, float yes"));
+ OK(getFromSocket("/keyword input:float_switch_override_focus 0"));
+
+ EXPECT(spawnKitty("kitty"), true);
+
+ {
+ // Kitty by default opens as 640x400, if this changes this test will break
+ auto str = getFromSocket("/clients");
+ EXPECT(str.contains("size: 640,400"), true);
+ }
+
+ OK(getFromSocket("/reload"));
+
+ Tests::killAllWindows();
+
+ OK(getFromSocket("/dispatch exec [float yes]kitty"));
+
+ Tests::waitUntilWindowsN(1);
+
+ {
+ // Kitty by default opens as 640x400, if this changes this test will break
+ auto str = getFromSocket("/clients");
+ EXPECT(str.contains("size: 640,400"), true);
+ EXPECT(str.contains("floating: 1"), true);
+ }
+
+ Tests::killAllWindows();
+}
+
static bool test() {
NLog::log("{}Testing windows", Colors::GREEN);
@@ -877,12 +910,10 @@ static bool test() {
Tests::killAllWindows();
testGroupRules();
-
testMaximizeSize();
-
testBringActiveToTopMouseMovement();
-
testGroupFallbackFocus();
+ testInitialFloatSize();
NLog::log("{}Reloading config", Colors::YELLOW);
OK(getFromSocket("/reload"));