Skip to content

Commit

Permalink
tests: Respond to post-initial configures
Browse files Browse the repository at this point in the history
  • Loading branch information
YaLTeR committed Dec 29, 2024
1 parent 4a5b03c commit 6d59226
Show file tree
Hide file tree
Showing 17 changed files with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
18 changes: 18 additions & 0 deletions src/tests/window_opening.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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!(
"\
Expand Down

0 comments on commit 6d59226

Please sign in to comment.