summaryrefslogtreecommitdiff
path: root/hyprtester
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2026-05-08 23:22:07 +0100
committerGitHub <noreply@github.com>2026-05-08 23:22:07 +0100
commit8b78de5d90cb81ebf01df1c84ca205b22aced7d1 (patch)
treea17e7ccd32c364697af791268fbb0779f31443d1 /hyprtester
parent1a164704e7596d743dfeade3946385997254b019 (diff)
compositor: recalculate workspace state after fs state update (#14369)main
Diffstat (limited to 'hyprtester')
-rw-r--r--hyprtester/src/tests/main/window.cpp51
1 files changed, 50 insertions, 1 deletions
diff --git a/hyprtester/src/tests/main/window.cpp b/hyprtester/src/tests/main/window.cpp
index bb5e0f20..0b1b4248 100644
--- a/hyprtester/src/tests/main/window.cpp
+++ b/hyprtester/src/tests/main/window.cpp
@@ -1123,4 +1123,53 @@ TEST_CASE(cycle_nextFloating) {
OK(getFromSocket("/dispatch hl.dsp.window.cycle_next({ next = true, tiled = false, floating = true})"));
ASSERT_CONTAINS(getFromSocket("/activewindow"), "class: b");
-} \ No newline at end of file
+}
+
+TEST_CASE(discussion14233) {
+ // toggling fullscreen should not mess up workspace state on a 2 window workspace
+ // with smart gaps
+
+ 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);
+
+ // just make sure smart gaps work
+ {
+ auto str = getFromSocket("/clients");
+ ASSERT_CONTAINS(str, "size: 1920,1080");
+ ASSERT_CONTAINS(str, "at: 0,0");
+ }
+
+ ASSERT(!!Tests::spawnKitty(), true);
+
+ {
+ auto str = getFromSocket("/clients");
+ ASSERT_COUNT_STRING(str, "size: 931,1036", 2);
+ ASSERT_CONTAINS(str, "at: 22,22");
+ ASSERT_CONTAINS(str, "at: 967,22");
+ }
+
+ OK(getFromSocket("/dispatch hl.dsp.window.fullscreen()"));
+ OK(getFromSocket("/dispatch hl.dsp.window.fullscreen()"));
+
+ {
+ auto str = getFromSocket("/clients");
+ ASSERT_COUNT_STRING(str, "size: 931,1036", 2);
+ ASSERT_CONTAINS(str, "at: 22,22");
+ ASSERT_CONTAINS(str, "at: 967,22");
+ }
+}