| 1 | use super::*; |
| 2 | |
| 3 | #[test] |
| 4 | fn set_fullscreen_on_removed_output_does_not_panic() { |
| 5 | let mut f = Fixture::new(); |
| 6 | f.add_output(1, (1920, 1080)); |
| 7 | f.add_output(2, (1280, 720)); |
| 8 | |
| 9 | let id = f.add_client(); |
| 10 | |
| 11 | let window = f.client(id).create_window(); |
| 12 | let surface = window.surface.clone(); |
| 13 | window.commit(); |
| 14 | f.roundtrip(id); |
| 15 | |
| 16 | let window = f.client(id).window(&surface); |
| 17 | window.attach_new_buffer(); |
| 18 | window.set_size(100, 100); |
| 19 | window.ack_last_and_commit(); |
| 20 | f.double_roundtrip(id); |
| 21 | |
| 22 | |
| 23 | let wl_output = f.client(id).output("headless-2"); |
| 24 | |
| 25 | |
| 26 | |
| 27 | let output = f.niri_output(2); |
| 28 | f.niri().remove_output(&output); |
| 29 | |
| 30 | |
| 31 | let window = f.client(id).window(&surface); |
| 32 | window.set_fullscreen(Some(&wl_output)); |
| 33 | f.double_roundtrip(id); |
| 34 | } |