diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-02-05 09:33:44 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-02-05 09:36:58 +0300 |
| commit | ddcac86d1d568463ef828bf370d8989bbf12c9fd (patch) | |
| tree | 40a6b35be3a4c1a66b0f0dd81264d5b8768b8926 /src/tests | |
| parent | 734e3a6d3cea277e56baf4531695e989b2d1bdda (diff) | |
| download | niri-ddcac86d1d568463ef828bf370d8989bbf12c9fd.tar.gz niri-ddcac86d1d568463ef828bf370d8989bbf12c9fd.tar.bz2 niri-ddcac86d1d568463ef828bf370d8989bbf12c9fd.zip | |
mapped: Add needs_configure flag
Allows to de-duplicate configures from requests that require one.
Diffstat (limited to 'src/tests')
| -rw-r--r-- | src/tests/floating.rs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/tests/floating.rs b/src/tests/floating.rs index 8b63d55d..81e507f1 100644 --- a/src/tests/floating.rs +++ b/src/tests/floating.rs @@ -854,3 +854,30 @@ window-rule { @"size: 300 × 100, bounds: 1920 × 1080, states: [Activated]" ); } + +#[test] +fn unfullscreen_to_floating_doesnt_send_extra_configure() { + let (mut f, id, surface) = set_up(); + + // Make it floating. + f.niri().layout.toggle_window_floating(None); + f.roundtrip(id); + + // Fullscreen. + let window = f.client(id).window(&surface); + window.set_fullscreen(None); + f.double_roundtrip(id); + + let _ = f.client(id).window(&surface).recent_configures(); + + // Unfullscreen via the window request which requires a configure response. + let window = f.client(id).window(&surface); + window.unset_fullscreen(); + f.double_roundtrip(id); + + // This should configure only once and not twice. + assert_snapshot!( + f.client(id).window(&surface).format_recent_configures(), + @"size: 936 × 1048, bounds: 1920 × 1080, states: [Activated]" + ); +} |
