From a6a0cc308c827557d04cb3e4c3b5d258de0411e6 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Fri, 8 May 2026 15:00:38 +0100 Subject: desktop/workspace: fix visibility criteria matching (#14349) ref https://github.com/hyprwm/Hyprland/discussions/14233 --- hyprtester/src/tests/main/workspaces.cpp | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'hyprtester/src/tests/main/workspaces.cpp') diff --git a/hyprtester/src/tests/main/workspaces.cpp b/hyprtester/src/tests/main/workspaces.cpp index 8cde4914..6cd18766 100644 --- a/hyprtester/src/tests/main/workspaces.cpp +++ b/hyprtester/src/tests/main/workspaces.cpp @@ -754,3 +754,43 @@ TEST_CASE(workspacesCombined) { NLog::log("{}Expecting 0 windows", Colors::YELLOW); ASSERT(Tests::windowCount(), 0); } + +TEST_CASE(workspacesFollowProperNoGaps) { + OK(getFromSocket("/dispatch hl.dsp.focus({ workspace = \"100\" })")); + OK(getFromSocket(R"#(/eval hl.workspace_rule({ workspace = "w[tv1]", gaps_out = 0, gaps_in = 0 }) + hl.workspace_rule({ workspace = "f[1]", gaps_out = 0, gaps_in = 0 }) + hl.window_rule({ + name = "no-gaps-wtv1", + match = { float = false, workspace = "w[tv1]" }, + border_size = 0, + rounding = 0, + }) + hl.window_rule({ + name = "no-gaps-f1", + match = { float = false, workspace = "f[1]" }, + border_size = 0, + rounding = 0, + }) + )#")); + + ASSERT(!!Tests::spawnKitty(), true); + + { + auto str = getFromSocket("/activewindow"); + ASSERT_CONTAINS(str, "size: 1920,1080"); + } + + ASSERT(!!Tests::spawnKitty(), true); + + OK(getFromSocket("/dispatch hl.dsp.window.move({ workspace = \"101\" })")); + + { + auto str = getFromSocket("/activewindow"); + ASSERT_CONTAINS(str, "size: 1920,1080"); + } + + { + auto str = getFromSocket("/activeworkspace"); + ASSERT_CONTAINS(str, "workspace ID 101 (101)"); + } +} -- cgit v1.2.3