summaryrefslogtreecommitdiff
path: root/hyprtester/src/tests/main/workspaces.cpp
diff options
context:
space:
mode:
authorMr-Stoneman <72991726+Mr-Stoneman@users.noreply.github.com>2026-03-26 22:38:39 +0100
committerGitHub <noreply@github.com>2026-03-26 21:38:39 +0000
commitb0f6ac23b26e62f650d3b26dfb0aa7eb15e29da8 (patch)
tree35940b79aa54b522bd1b3301a5885cf61aa1a676 /hyprtester/src/tests/main/workspaces.cpp
parent4c29b9de4e0175e368a3c7f1f90a46c902af3d18 (diff)
desktop/workspaceHistory: small refactor to work better with multi monitor setups (#13632)
Diffstat (limited to 'hyprtester/src/tests/main/workspaces.cpp')
-rw-r--r--hyprtester/src/tests/main/workspaces.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/hyprtester/src/tests/main/workspaces.cpp b/hyprtester/src/tests/main/workspaces.cpp
index 122cd619..f7c948f2 100644
--- a/hyprtester/src/tests/main/workspaces.cpp
+++ b/hyprtester/src/tests/main/workspaces.cpp
@@ -193,6 +193,35 @@ static bool testAsymmetricGaps() {
return true;
}
+static void testWorkspaceHistoryMultiMon() {
+ NLog::log("{}Testing multimon workspace history tracker", Colors::YELLOW);
+
+ // Initial state:
+ OK(getFromSocket("/dispatch focusmonitor HEADLESS-2"));
+ OK(getFromSocket("/dispatch workspace 10"));
+ Tests::spawnKitty();
+ OK(getFromSocket("/dispatch workspace 11"));
+ Tests::spawnKitty();
+
+ OK(getFromSocket("/dispatch focusmonitor HEADLESS-3"));
+ OK(getFromSocket("/dispatch workspace 12"));
+ Tests::spawnKitty();
+
+ OK(getFromSocket("/dispatch focusmonitor HEADLESS-2"));
+ {
+ auto str = getFromSocket("/activeworkspace");
+ EXPECT_CONTAINS(str, "workspace ID 11");
+ }
+ OK(getFromSocket("/dispatch workspace previous_per_monitor"));
+ {
+ auto str = getFromSocket("/activeworkspace");
+ EXPECT_CONTAINS(str, "workspace ID 10");
+ }
+
+ NLog::log("{}Killing all windows", Colors::YELLOW);
+ Tests::killAllWindows();
+}
+
static void testMultimonBAF() {
NLog::log("{}Testing multimon back and forth", Colors::YELLOW);
@@ -733,6 +762,7 @@ static bool test() {
testMultimonBAF();
testMultimonFocus();
+ testWorkspaceHistoryMultiMon();
// destroy the headless output
OK(getFromSocket("/output remove HEADLESS-3"));