diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2026-03-02 18:57:09 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-02 18:57:09 +0000 |
| commit | d98f7ffaf5ce8fcfe901e4cdcb3dc0d1a5f48816 (patch) | |
| tree | e4d35bfca286f36d56f859370aa0b5b2f8681c24 /hyprtester/src | |
| parent | 5f650f8ed99705f51b473e592c974a7ddaa3c9d7 (diff) | |
layout: store and preserve size and pos after fullscreen (#13500)
ref https://github.com/hyprwm/Hyprland/discussions/13401
Diffstat (limited to 'hyprtester/src')
| -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); |
