diff options
Diffstat (limited to 'hyprtester/src/tests/main/layout.cpp')
| -rw-r--r-- | hyprtester/src/tests/main/layout.cpp | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/hyprtester/src/tests/main/layout.cpp b/hyprtester/src/tests/main/layout.cpp index 98e54f79..186d7034 100644 --- a/hyprtester/src/tests/main/layout.cpp +++ b/hyprtester/src/tests/main/layout.cpp @@ -53,6 +53,54 @@ static void testCrashOnGeomUpdate() { // shouldnt crash OK(getFromSocket("/dispatch movefocus r")); + + OK(getFromSocket("/reload")); + + NLog::log("{}Killing all windows", Colors::YELLOW); + Tests::killAllWindows(); +} + +// Test if size + pos is preserved after fs cycle +static void testPosPreserve() { + Tests::spawnKitty(); + + OK(getFromSocket("/dispatch setfloating class:kitty")); + OK(getFromSocket("/dispatch resizewindowpixel exact 1337 69, class:kitty")); + OK(getFromSocket("/dispatch movewindowpixel exact 420 420, class:kitty")); + + { + auto str = getFromSocket("/activewindow"); + EXPECT_CONTAINS(str, "at: 420,420"); + EXPECT_CONTAINS(str, "size: 1337,69"); + } + + OK(getFromSocket("/dispatch fullscreen")); + OK(getFromSocket("/dispatch fullscreen")); + + { + auto str = getFromSocket("/activewindow"); + EXPECT_CONTAINS(str, "size: 1337,69"); + } + + OK(getFromSocket("/dispatch movewindow r")); + + { + auto str = getFromSocket("/activewindow"); + EXPECT_CONTAINS(str, "at: 581,420"); + EXPECT_CONTAINS(str, "size: 1337,69"); + } + + OK(getFromSocket("/dispatch fullscreen")); + OK(getFromSocket("/dispatch fullscreen")); + + { + auto str = getFromSocket("/activewindow"); + EXPECT_CONTAINS(str, "at: 581,420"); + EXPECT_CONTAINS(str, "size: 1337,69"); + } + + NLog::log("{}Killing all windows", Colors::YELLOW); + Tests::killAllWindows(); } static bool test() { @@ -66,6 +114,7 @@ static bool test() { swar(); testCrashOnGeomUpdate(); + testPosPreserve(); // clean up NLog::log("Cleaning up", Colors::YELLOW); |
