diff options
| author | Nikolai Nechaev <nikolay_nechaev@mail.ru> | 2026-03-10 19:04:21 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-10 10:04:21 +0000 |
| commit | 8a12d6cf7e3b11ea46e6d76f219b1d1cdde9e797 (patch) | |
| tree | a0a2b62059f89f45aef0f20616768460748e95fd /hyprtester/src/tests/main/dwindle.cpp | |
| parent | e32eeb1d454b029a24ca71f410896bf52839085d (diff) | |
algo/dwindle: Respect `force_split` when moving windows to workspaces (#13038)
Respect `dwindle:force_split` not only when mapping new windows,
but also when moving windows to workspaces.
Fixes #13009.
Diffstat (limited to 'hyprtester/src/tests/main/dwindle.cpp')
| -rw-r--r-- | hyprtester/src/tests/main/dwindle.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/hyprtester/src/tests/main/dwindle.cpp b/hyprtester/src/tests/main/dwindle.cpp index 5504282d..9513db67 100644 --- a/hyprtester/src/tests/main/dwindle.cpp +++ b/hyprtester/src/tests/main/dwindle.cpp @@ -227,6 +227,28 @@ static void testRotatesplit() { OK(getFromSocket("/reload")); } +static void testForceSplitOnMoveToWorkspace() { + OK(getFromSocket("/dispatch workspace 2")); + EXPECT(!!Tests::spawnKitty("kitty"), true); + + OK(getFromSocket("/dispatch workspace 1")); + EXPECT(!!Tests::spawnKitty("kitty"), true); + std::string posBefore = Tests::getWindowAttribute(getFromSocket("/activewindow"), "at:"); + + OK(getFromSocket("/keyword dwindle:force_split 2")); + OK(getFromSocket("/dispatch movecursortocorner 3")); // top left + OK(getFromSocket("/dispatch movetoworkspace 2")); + + // Should be moved to the right, so the position should change + std::string activeWindow = getFromSocket("/activewindow"); + EXPECT(activeWindow.contains(posBefore), false); + + // clean up + OK(getFromSocket("/reload")); + Tests::killAllWindows(); + Tests::waitUntilWindowsN(0); +} + static bool test() { NLog::log("{}Testing Dwindle layout", Colors::GREEN); @@ -243,6 +265,9 @@ static bool test() { NLog::log("{}Testing rotatesplit", Colors::GREEN); testRotatesplit(); + NLog::log("{}Testing force_split on move to workspace", Colors::GREEN); + testForceSplitOnMoveToWorkspace(); + // clean up NLog::log("Cleaning up", Colors::YELLOW); getFromSocket("/dispatch workspace 1"); |
