aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-12-29 11:12:43 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2024-12-30 20:12:37 +0300
commitd6da9f47d810790799542d798b2dd536172d07c0 (patch)
tree3f18dbe4d143ca9f74d18e4e9b908563e3462411 /src/tests
parentbe05b66ac323845fb65fe87384b5a8aae0e1fd18 (diff)
downloadniri-d6da9f47d810790799542d798b2dd536172d07c0.tar.gz
niri-d6da9f47d810790799542d798b2dd536172d07c0.tar.bz2
niri-d6da9f47d810790799542d798b2dd536172d07c0.zip
tests: Respond to post-initial configures
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsAU-spA1.snap1
-rw-r--r--src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsAU-spA2.snap1
-rw-r--r--src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsAU-spA1.snap1
-rw-r--r--src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsAU-spA2.snap1
-rw-r--r--src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-fsF-wfsAU-spA1.snap1
-rw-r--r--src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-fsF-wfsAU-spA2.snap1
-rw-r--r--src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out1-fsF-wfsAU-spA1.snap1
-rw-r--r--src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out1-fsF-wfsAU-spA2.snap1
-rw-r--r--src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out1-wfsAU-spA1.snap1
-rw-r--r--src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out1-wfsAU-spA2.snap1
-rw-r--r--src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out2-fsF-wfsAU-spA1.snap1
-rw-r--r--src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out2-fsF-wfsAU-spA2.snap1
-rw-r--r--src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out2-wfsAU-spA1.snap1
-rw-r--r--src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out2-wfsAU-spA2.snap1
-rw-r--r--src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-wfsAU-spA1.snap1
-rw-r--r--src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-wfsAU-spA2.snap1
-rw-r--r--src/tests/window_opening.rs18
17 files changed, 34 insertions, 0 deletions
diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsAU-spA1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsAU-spA1.snap
index fb8c4a6c..c3d17767 100644
--- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsAU-spA1.snap
+++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsAU-spA1.snap
@@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: []
post-map configures:
size: 0 × 0, bounds: 1920 × 1080, states: []
+size: 1 × 1, bounds: 1920 × 1080, states: []
diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsAU-spA2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsAU-spA2.snap
index fd609bb7..512f6941 100644
--- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsAU-spA2.snap
+++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsAU-spA2.snap
@@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: []
post-map configures:
size: 0 × 0, bounds: 1920 × 1080, states: []
+size: 1 × 1, bounds: 1920 × 1080, states: []
diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsAU-spA1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsAU-spA1.snap
index 37e74fd0..372200c2 100644
--- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsAU-spA1.snap
+++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsAU-spA1.snap
@@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: []
post-map configures:
size: 0 × 0, bounds: 1920 × 1080, states: []
+size: 1 × 1, bounds: 1920 × 1080, states: []
diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsAU-spA2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsAU-spA2.snap
index f9db3074..3ec93fde 100644
--- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsAU-spA2.snap
+++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsAU-spA2.snap
@@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: []
post-map configures:
size: 0 × 0, bounds: 1920 × 1080, states: []
+size: 1 × 1, bounds: 1920 × 1080, states: []
diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-fsF-wfsAU-spA1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-fsF-wfsAU-spA1.snap
index 35f5d651..8d9deacb 100644
--- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-fsF-wfsAU-spA1.snap
+++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-fsF-wfsAU-spA1.snap
@@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: []
post-map configures:
size: 0 × 0, bounds: 1920 × 1080, states: []
+size: 1 × 1, bounds: 1920 × 1080, states: []
diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-fsF-wfsAU-spA2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-fsF-wfsAU-spA2.snap
index cf8f67e5..b76da764 100644
--- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-fsF-wfsAU-spA2.snap
+++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-fsF-wfsAU-spA2.snap
@@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: []
post-map configures:
size: 0 × 0, bounds: 1920 × 1080, states: []
+size: 1 × 1, bounds: 1920 × 1080, states: []
diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out1-fsF-wfsAU-spA1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out1-fsF-wfsAU-spA1.snap
index dea72cbe..0e5bf30a 100644
--- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out1-fsF-wfsAU-spA1.snap
+++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out1-fsF-wfsAU-spA1.snap
@@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: []
post-map configures:
size: 0 × 0, bounds: 1920 × 1080, states: []
+size: 1 × 1, bounds: 1920 × 1080, states: []
diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out1-fsF-wfsAU-spA2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out1-fsF-wfsAU-spA2.snap
index 82a452df..e90ace33 100644
--- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out1-fsF-wfsAU-spA2.snap
+++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out1-fsF-wfsAU-spA2.snap
@@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: []
post-map configures:
size: 0 × 0, bounds: 1920 × 1080, states: []
+size: 1 × 1, bounds: 1920 × 1080, states: []
diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out1-wfsAU-spA1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out1-wfsAU-spA1.snap
index 1b051985..730aa30d 100644
--- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out1-wfsAU-spA1.snap
+++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out1-wfsAU-spA1.snap
@@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: []
post-map configures:
size: 0 × 0, bounds: 1920 × 1080, states: []
+size: 1 × 1, bounds: 1920 × 1080, states: []
diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out1-wfsAU-spA2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out1-wfsAU-spA2.snap
index 25fbb78e..1f74faae 100644
--- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out1-wfsAU-spA2.snap
+++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out1-wfsAU-spA2.snap
@@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: []
post-map configures:
size: 0 × 0, bounds: 1920 × 1080, states: []
+size: 1 × 1, bounds: 1920 × 1080, states: []
diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out2-fsF-wfsAU-spA1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out2-fsF-wfsAU-spA1.snap
index 132cbb82..31c69c11 100644
--- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out2-fsF-wfsAU-spA1.snap
+++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out2-fsF-wfsAU-spA1.snap
@@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: []
post-map configures:
size: 0 × 0, bounds: 1920 × 1080, states: []
+size: 1 × 1, bounds: 1920 × 1080, states: []
diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out2-fsF-wfsAU-spA2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out2-fsF-wfsAU-spA2.snap
index ba4a82c3..d12fecf2 100644
--- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out2-fsF-wfsAU-spA2.snap
+++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out2-fsF-wfsAU-spA2.snap
@@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: []
post-map configures:
size: 0 × 0, bounds: 1920 × 1080, states: []
+size: 1 × 1, bounds: 1920 × 1080, states: []
diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out2-wfsAU-spA1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out2-wfsAU-spA1.snap
index 11face3e..4be2db6c 100644
--- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out2-wfsAU-spA1.snap
+++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out2-wfsAU-spA1.snap
@@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: []
post-map configures:
size: 0 × 0, bounds: 1920 × 1080, states: []
+size: 1 × 1, bounds: 1920 × 1080, states: []
diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out2-wfsAU-spA2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out2-wfsAU-spA2.snap
index 3ea40895..c1f66632 100644
--- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out2-wfsAU-spA2.snap
+++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out2-wfsAU-spA2.snap
@@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: []
post-map configures:
size: 0 × 0, bounds: 1920 × 1080, states: []
+size: 1 × 1, bounds: 1920 × 1080, states: []
diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-wfsAU-spA1.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-wfsAU-spA1.snap
index 3f5c1133..886ee409 100644
--- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-wfsAU-spA1.snap
+++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-wfsAU-spA1.snap
@@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: []
post-map configures:
size: 0 × 0, bounds: 1920 × 1080, states: []
+size: 1 × 1, bounds: 1920 × 1080, states: []
diff --git a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-wfsAU-spA2.snap b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-wfsAU-spA2.snap
index 707416ba..abb90154 100644
--- a/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-wfsAU-spA2.snap
+++ b/src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-wfsAU-spA2.snap
@@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: []
post-map configures:
size: 0 × 0, bounds: 1920 × 1080, states: []
+size: 1 × 1, bounds: 1920 × 1080, states: []
diff --git a/src/tests/window_opening.rs b/src/tests/window_opening.rs
index 8c924886..4f34d3d7 100644
--- a/src/tests/window_opening.rs
+++ b/src/tests/window_opening.rs
@@ -334,9 +334,18 @@ window-rule {{
let window = client.window(&surface);
window.attach_new_buffer();
+ let serial = window.configures_received.last().unwrap().0;
window.ack_last_and_commit();
f.double_roundtrip(id);
+ // Commit to the post-intial configures.
+ let window = f.client(id).window(&surface);
+ let new_serial = window.configures_received.last().unwrap().0;
+ if new_serial != serial {
+ window.ack_last_and_commit();
+ f.double_roundtrip(id);
+ }
+
let niri = f.niri();
let (mon, ws_idx, ws) = niri
.layout
@@ -548,9 +557,18 @@ window-rule {
let window = client.window(&surface);
window.attach_new_buffer();
+ let serial = window.configures_received.last().unwrap().0;
window.ack_last_and_commit();
f.double_roundtrip(id);
+ // Commit to the post-intial configures.
+ let window = f.client(id).window(&surface);
+ let new_serial = window.configures_received.last().unwrap().0;
+ if new_serial != serial {
+ window.ack_last_and_commit();
+ f.double_roundtrip(id);
+ }
+
let window = f.client(id).window(&surface);
let snapshot = format!(
"\