summaryrefslogtreecommitdiff
path: root/hyprtester/src/tests/main/workspaces.cpp
diff options
context:
space:
mode:
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"));