fix #407: windowed resolution offering decoupled from the video-mode list
Campaign CC gate round 1. The Config Resolution dropdown now offers DisplayModeCatalog.WindowedResolutions — the curated hardware modes UNIONed with the static modern-ladder sizes that fit the desktop — because a windowed pick is a plain Size write needing no video mode, and remote/RDP virtual displays advertise almost none (the live RDP display exposed exactly 1920x1080 + the 2056x1290 desktop, leaving the dropdown with nothing below 1920). The fullscreen apply still validates against the hardware Resolutions list plus the switcher's monitor-mode-list hard guard, so a fullscreen pick of a windowed-only entry refuses safely (log-and-stay, #388/#392) — IA-22's offered-implies-supported invariant narrows to the fullscreen half and its register row carries the amendment. Three new pure-union tests including the exact live RDP shape. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
26e6f984f4
commit
e601a496db
4 changed files with 119 additions and 5 deletions
|
|
@ -105,4 +105,46 @@ public sealed class DisplayModeCatalogTests
|
|||
// be re-selectable from the offered list.
|
||||
Assert.Contains(DisplaySettings.Default.Resolution, DisplaySettings.AvailableResolutions);
|
||||
}
|
||||
|
||||
// ── #407: the windowed offering union (Campaign CC gate round 1) ────
|
||||
|
||||
[Fact]
|
||||
public void BuildWindowedOffering_RdpStarvedModeList_GainsTheLadderSizesThatFit()
|
||||
{
|
||||
// The live RDP shape that motivated #407: the virtual display
|
||||
// advertised exactly two modes (1920x1080 + the 2056x1290 desktop),
|
||||
// so the hardware-gated dropdown offered nothing below 1920. The
|
||||
// windowed union restores every static-ladder size that fits.
|
||||
var offering = DisplayModeCatalog.BuildWindowedOffering(
|
||||
["1920x1080", "2056x1290"], (2056, 1290));
|
||||
|
||||
Assert.Equal(
|
||||
["1280x720", "1366x768", "1600x900", "1920x1080", "2056x1290"],
|
||||
offering);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void BuildWindowedOffering_RichMonitor_IsTheDedupedUnion()
|
||||
{
|
||||
// On a physical monitor the hardware list already contains the
|
||||
// ladder sizes — the union adds nothing and stays ascending/deduped.
|
||||
var offering = DisplayModeCatalog.BuildWindowedOffering(
|
||||
["1280x720", "1366x768", "1600x900", "1920x1080", "1920x1200", "2560x1440"],
|
||||
Desktop2560);
|
||||
|
||||
Assert.Equal(
|
||||
["1280x720", "1366x768", "1600x900", "1920x1080", "1920x1200", "2560x1440"],
|
||||
offering);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void BuildWindowedOffering_LadderEntriesLargerThanTheDesktop_StayExcluded()
|
||||
{
|
||||
// A 1600x900 desktop admits only the ladder sizes that fit; the
|
||||
// desktop's own (hardware-curated) mode always survives the union.
|
||||
var offering = DisplayModeCatalog.BuildWindowedOffering(
|
||||
["1600x900"], (1600, 900));
|
||||
|
||||
Assert.Equal(["1280x720", "1366x768", "1600x900"], offering);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue