diff options
| author | Maxim Andreev <andreevmaxim@gmail.com> | 2026-05-05 19:31:09 +0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-05 16:31:09 +0100 |
| commit | d6aa6af5b3b3cc7c086423cb12c6f2bb76bd15c2 (patch) | |
| tree | 71500ba1cacf2c3ee4500071a08b9452fcf1aada /hyprtester | |
| parent | 497b48e8520e4beac16a1a209551c3db46a6d917 (diff) | |
groups: add groupbar middle_click_close option (#14242)
Diffstat (limited to 'hyprtester')
| -rw-r--r-- | hyprtester/src/tests/main/groups.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/hyprtester/src/tests/main/groups.cpp b/hyprtester/src/tests/main/groups.cpp index e1d4dd9b..aeb43330 100644 --- a/hyprtester/src/tests/main/groups.cpp +++ b/hyprtester/src/tests/main/groups.cpp @@ -400,4 +400,43 @@ TEST_CASE(groups) { Tests::killAllWindows(); ASSERT(Tests::windowCount(), 0); + + // Test groupbar middle click close config + { + OK(getFromSocket("/eval hl.config({ group = { auto_group = true, groupbar = { enabled = true, middle_click_close = false } } })")); + + auto kittyA = Tests::spawnKitty("kittyA"); + if (!kittyA) { + FAIL_TEST("Could not spawn kitty"); + } + + OK(getFromSocket("/dispatch hl.dsp.group.toggle()")); + + auto kittyB = Tests::spawnKitty("kittyB"); + if (!kittyB) { + FAIL_TEST("Could not spawn kitty"); + } + + EXPECT(Tests::windowCount(), 2); + + OK(getFromSocket("/dispatch hl.dsp.cursor.move({ x = 80, y = 32 })")); + OK(getFromSocket("/eval hl.plugin.test.click(274, 1)")); + OK(getFromSocket("/eval hl.plugin.test.click(274, 0)")); + + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + EXPECT(Tests::windowCount(), 2); + + OK(getFromSocket("/eval hl.config({ group = { groupbar = { middle_click_close = true } } })")); + OK(getFromSocket("/dispatch hl.dsp.cursor.move({ x = 80, y = 32 })")); + OK(getFromSocket("/eval hl.plugin.test.click(274, 1)")); + OK(getFromSocket("/eval hl.plugin.test.click(274, 0)")); + + Tests::waitUntilWindowsN(1); + EXPECT(Tests::windowCount(), 1); + + OK(getFromSocket("/eval hl.config({ group = { groupbar = { enabled = 0 } } })")); + } + + Tests::killAllWindows(); + ASSERT(Tests::windowCount(), 0); } |
