diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2026-03-03 12:33:46 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-03 12:33:46 +0000 |
| commit | b06a4b5e130710ee66d0a9b04780d99777d87b47 (patch) | |
| tree | 5702413ae991e0f710b0b628034a6415db09c372 /hyprtester/src/tests/main/master.cpp | |
| parent | 3faddf40d08fe00738cfe7b85dc48953c27012bb (diff) | |
layout/windowTarget: override maximized box status in updateGeom (#13535)
ref https://github.com/hyprwm/Hyprland/discussions/13525
Diffstat (limited to 'hyprtester/src/tests/main/master.cpp')
| -rw-r--r-- | hyprtester/src/tests/main/master.cpp | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/hyprtester/src/tests/main/master.cpp b/hyprtester/src/tests/main/master.cpp index 441143ac..9aaa4cf0 100644 --- a/hyprtester/src/tests/main/master.cpp +++ b/hyprtester/src/tests/main/master.cpp @@ -97,6 +97,67 @@ static void focusMasterPrevious() { Tests::killAllWindows(); } +static void testFsBehavior() { + // Master will re-send data to fullscreen / maximized windows, which can interfere with misc:on_focus_under_fullscreen + // check that it doesn't. + + for (auto const& win : {"master", "slave1", "slave2"}) { + 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:master")); + OK(getFromSocket("/dispatch fullscreen 1")); + + { + auto str = getFromSocket("/activewindow"); + EXPECT_CONTAINS(str, "at: 22,22"); + EXPECT_CONTAINS(str, "size: 1876,1036"); + EXPECT_CONTAINS(str, "class: master"); + } + + OK(getFromSocket("/keyword misc:on_focus_under_fullscreen 1")); + + Tests::spawnKitty("new_master"); + + { + auto str = getFromSocket("/activewindow"); + EXPECT_CONTAINS(str, "at: 22,22"); + EXPECT_CONTAINS(str, "size: 1876,1036"); + EXPECT_CONTAINS(str, "class: new_master"); + EXPECT_CONTAINS(str, "fullscreen: 1"); + } + + OK(getFromSocket("/keyword misc:on_focus_under_fullscreen 0")); + + Tests::spawnKitty("ignored"); + + { + auto str = getFromSocket("/activewindow"); + EXPECT_CONTAINS(str, "at: 22,22"); + EXPECT_CONTAINS(str, "size: 1876,1036"); + EXPECT_CONTAINS(str, "class: new_master"); + EXPECT_CONTAINS(str, "fullscreen: 1"); + } + + OK(getFromSocket("/keyword misc:on_focus_under_fullscreen 2")); + + Tests::spawnKitty("vaxwashere"); + + { + auto str = getFromSocket("/activewindow"); + EXPECT_CONTAINS(str, "class: vaxwashere"); + EXPECT_CONTAINS(str, "fullscreen: 0"); + } + + NLog::log("{}Killing all windows", Colors::YELLOW); + Tests::killAllWindows(); +} + static bool test() { NLog::log("{}Testing Master layout", Colors::GREEN); @@ -108,6 +169,9 @@ static bool test() { NLog::log("{}Testing `focusmaster previous` layoutmsg", Colors::GREEN); focusMasterPrevious(); + NLog::log("{}Testing fs behavior", Colors::GREEN); + testFsBehavior(); + // clean up NLog::log("Cleaning up", Colors::YELLOW); OK(getFromSocket("/dispatch workspace 1")); |
