tests: Respond to post-initial configures
Browse files at this commitd6da9f47d810790799542d798b2dd536172d07c0Parent: be05b6617 changed files +34 -0
- src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsAU-spA1.snap +1 -0
- src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsAU-spA2.snap +1 -0
- src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsAU-spA1.snap +1 -0
- src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsAU-spA2.snap +1 -0
- src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-fsF-wfsAU-spA1.snap +1 -0
- src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-fsF-wfsAU-spA2.snap +1 -0
- src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out1-fsF-wfsAU-spA1.snap +1 -0
- src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out1-fsF-wfsAU-spA2.snap +1 -0
- src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out1-wfsAU-spA1.snap +1 -0
- src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out1-wfsAU-spA2.snap +1 -0
- src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out2-fsF-wfsAU-spA1.snap +1 -0
- src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out2-fsF-wfsAU-spA2.snap +1 -0
- src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out2-wfsAU-spA1.snap +1 -0
- src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out2-wfsAU-spA2.snap +1 -0
- src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-wfsAU-spA1.snap +1 -0
- src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-wfsAU-spA2.snap +1 -0
- src/tests/window_opening.rs +18 -0
src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsAU-spA1.snapmodified+1 -0
| @@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: [] | |||
| 12 | 12 | ||
| 13 | post-map configures: | 13 | post-map configures: |
| 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] | 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] |
| 15 | +size: 1 × 1, bounds: 1920 × 1080, states: [] | ||
src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-fsF-wfsAU-spA2.snapmodified+1 -0
| @@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: [] | |||
| 12 | 12 | ||
| 13 | post-map configures: | 13 | post-map configures: |
| 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] | 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] |
| 15 | +size: 1 × 1, bounds: 1920 × 1080, states: [] | ||
src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsAU-spA1.snapmodified+1 -0
| @@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: [] | |||
| 12 | 12 | ||
| 13 | post-map configures: | 13 | post-map configures: |
| 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] | 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] |
| 15 | +size: 1 × 1, bounds: 1920 × 1080, states: [] | ||
src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@out2-wfsAU-spA2.snapmodified+1 -0
| @@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: [] | |||
| 12 | 12 | ||
| 13 | post-map configures: | 13 | post-map configures: |
| 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] | 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] |
| 15 | +size: 1 × 1, bounds: 1920 × 1080, states: [] | ||
src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-fsF-wfsAU-spA1.snapmodified+1 -0
| @@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: [] | |||
| 12 | 12 | ||
| 13 | post-map configures: | 13 | post-map configures: |
| 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] | 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] |
| 15 | +size: 1 × 1, bounds: 1920 × 1080, states: [] | ||
src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-fsF-wfsAU-spA2.snapmodified+1 -0
| @@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: [] | |||
| 12 | 12 | ||
| 13 | post-map configures: | 13 | post-map configures: |
| 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] | 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] |
| 15 | +size: 1 × 1, bounds: 1920 × 1080, states: [] | ||
src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out1-fsF-wfsAU-spA1.snapmodified+1 -0
| @@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: [] | |||
| 12 | 12 | ||
| 13 | post-map configures: | 13 | post-map configures: |
| 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] | 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] |
| 15 | +size: 1 × 1, bounds: 1920 × 1080, states: [] | ||
src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out1-fsF-wfsAU-spA2.snapmodified+1 -0
| @@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: [] | |||
| 12 | 12 | ||
| 13 | post-map configures: | 13 | post-map configures: |
| 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] | 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] |
| 15 | +size: 1 × 1, bounds: 1920 × 1080, states: [] | ||
src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out1-wfsAU-spA1.snapmodified+1 -0
| @@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: [] | |||
| 12 | 12 | ||
| 13 | post-map configures: | 13 | post-map configures: |
| 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] | 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] |
| 15 | +size: 1 × 1, bounds: 1920 × 1080, states: [] | ||
src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out1-wfsAU-spA2.snapmodified+1 -0
| @@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: [] | |||
| 12 | 12 | ||
| 13 | post-map configures: | 13 | post-map configures: |
| 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] | 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] |
| 15 | +size: 1 × 1, bounds: 1920 × 1080, states: [] | ||
src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out2-fsF-wfsAU-spA1.snapmodified+1 -0
| @@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: [] | |||
| 12 | 12 | ||
| 13 | post-map configures: | 13 | post-map configures: |
| 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] | 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] |
| 15 | +size: 1 × 1, bounds: 1920 × 1080, states: [] | ||
src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out2-fsF-wfsAU-spA2.snapmodified+1 -0
| @@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: [] | |||
| 12 | 12 | ||
| 13 | post-map configures: | 13 | post-map configures: |
| 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] | 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] |
| 15 | +size: 1 × 1, bounds: 1920 × 1080, states: [] | ||
src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out2-wfsAU-spA1.snapmodified+1 -0
| @@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: [] | |||
| 12 | 12 | ||
| 13 | post-map configures: | 13 | post-map configures: |
| 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] | 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] |
| 15 | +size: 1 × 1, bounds: 1920 × 1080, states: [] | ||
src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-out2-wfsAU-spA2.snapmodified+1 -0
| @@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: [] | |||
| 12 | 12 | ||
| 13 | post-map configures: | 13 | post-map configures: |
| 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] | 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] |
| 15 | +size: 1 × 1, bounds: 1920 × 1080, states: [] | ||
src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-wfsAU-spA1.snapmodified+1 -0
| @@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: [] | |||
| 12 | 12 | ||
| 13 | post-map configures: | 13 | post-map configures: |
| 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] | 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] |
| 15 | +size: 1 × 1, bounds: 1920 × 1080, states: [] | ||
src/tests/snapshots/niri__tests__window_opening__check_target_output_and_workspace@ws2-wfsAU-spA2.snapmodified+1 -0
| @@ -12,3 +12,4 @@ size: 936 × 1048, bounds: 1888 × 1048, states: [] | |||
| 12 | 12 | ||
| 13 | post-map configures: | 13 | post-map configures: |
| 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] | 14 | size: 0 × 0, bounds: 1920 × 1080, states: [] |
| 15 | +size: 1 × 1, bounds: 1920 × 1080, states: [] | ||
src/tests/window_opening.rsmodified+18 -0
| @@ -334,9 +334,18 @@ window-rule {{ | |||
| 334 | 334 | ||
| 335 | let window = client.window(&surface); | 335 | let window = client.window(&surface); |
| 336 | window.attach_new_buffer(); | 336 | window.attach_new_buffer(); |
| 337 | + let serial = window.configures_received.last().unwrap().0; | ||
| 337 | window.ack_last_and_commit(); | 338 | window.ack_last_and_commit(); |
| 338 | f.double_roundtrip(id); | 339 | f.double_roundtrip(id); |
| 339 | 340 | ||
| 341 | + // Commit to the post-intial configures. | ||
| 342 | + let window = f.client(id).window(&surface); | ||
| 343 | + let new_serial = window.configures_received.last().unwrap().0; | ||
| 344 | + if new_serial != serial { | ||
| 345 | + window.ack_last_and_commit(); | ||
| 346 | + f.double_roundtrip(id); | ||
| 347 | + } | ||
| 348 | + | ||
| 340 | let niri = f.niri(); | 349 | let niri = f.niri(); |
| 341 | let (mon, ws_idx, ws) = niri | 350 | let (mon, ws_idx, ws) = niri |
| 342 | .layout | 351 | .layout |
| @@ -548,9 +557,18 @@ window-rule { | |||
| 548 | 557 | ||
| 549 | let window = client.window(&surface); | 558 | let window = client.window(&surface); |
| 550 | window.attach_new_buffer(); | 559 | window.attach_new_buffer(); |
| 560 | + let serial = window.configures_received.last().unwrap().0; | ||
| 551 | window.ack_last_and_commit(); | 561 | window.ack_last_and_commit(); |
| 552 | f.double_roundtrip(id); | 562 | f.double_roundtrip(id); |
| 553 | 563 | ||
| 564 | + // Commit to the post-intial configures. | ||
| 565 | + let window = f.client(id).window(&surface); | ||
| 566 | + let new_serial = window.configures_received.last().unwrap().0; | ||
| 567 | + if new_serial != serial { | ||
| 568 | + window.ack_last_and_commit(); | ||
| 569 | + f.double_roundtrip(id); | ||
| 570 | + } | ||
| 571 | + | ||
| 554 | let window = f.client(id).window(&surface); | 572 | let window = f.client(id).window(&surface); |
| 555 | let snapshot = format!( | 573 | let snapshot = format!( |
| 556 | "\ | 574 | "\ |