diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2026-02-26 12:00:05 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-26 12:00:05 +0000 |
| commit | 0e9196867b4f602e1e5a599d4f3565faff615b3c (patch) | |
| tree | 415bb14ec20164d4ad5d3f8075c867e56ce6b768 /hyprtester/src/tests/main/dwindle.cpp | |
| parent | 1e06ab464ff1aa1e8d3f79b4aa702cab101edfb0 (diff) | |
algo/dwindle: fix focal point not being properly used in movedTarget (#13373)
Diffstat (limited to 'hyprtester/src/tests/main/dwindle.cpp')
| -rw-r--r-- | hyprtester/src/tests/main/dwindle.cpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/hyprtester/src/tests/main/dwindle.cpp b/hyprtester/src/tests/main/dwindle.cpp index 8f17c815..4135f2d6 100644 --- a/hyprtester/src/tests/main/dwindle.cpp +++ b/hyprtester/src/tests/main/dwindle.cpp @@ -34,6 +34,51 @@ static void testFloatClamp() { // clean up NLog::log("{}Killing all windows", Colors::YELLOW); Tests::killAllWindows(); + + OK(getFromSocket("/reload")); +} + +static void test13349() { + + // Test if dwindle properly uses a focal point to place a new window. + // exposed by #13349 as a regression from #12890 + + for (auto const& win : {"a", "b", "c"}) { + if (!Tests::spawnKitty(win)) { + NLog::log("{}Failed to spawn kitty with win class `{}`", Colors::RED, win); + ++TESTS_FAILED; + ret = 1; + return; + } + } + + OK(getFromSocket("/dispatch focuswindow class:c")); + + { + auto str = getFromSocket("/activewindow"); + EXPECT_CONTAINS(str, "at: 967,547"); + EXPECT_CONTAINS(str, "size: 931,511"); + } + + OK(getFromSocket("/dispatch movewindow l")); + + { + auto str = getFromSocket("/activewindow"); + EXPECT_CONTAINS(str, "at: 22,547"); + EXPECT_CONTAINS(str, "size: 931,511"); + } + + OK(getFromSocket("/dispatch movewindow r")); + + { + auto str = getFromSocket("/activewindow"); + EXPECT_CONTAINS(str, "at: 967,547"); + EXPECT_CONTAINS(str, "size: 931,511"); + } + + // clean up + NLog::log("{}Killing all windows", Colors::YELLOW); + Tests::killAllWindows(); } static bool test() { @@ -43,6 +88,9 @@ static bool test() { NLog::log("{}Testing float clamp", Colors::GREEN); testFloatClamp(); + NLog::log("{}Testing #13349", Colors::GREEN); + test13349(); + // clean up NLog::log("Cleaning up", Colors::YELLOW); getFromSocket("/dispatch workspace 1"); |
