Commit Graph
3 Commits
Author SHA1 Message Date
insideTheFluxandClaude Opus 5.5 d94479f8d4 LR-PREF-DISPLAY: wincolor inherits the workspace lints
`[lints] workspace = true` in place of its own tables, as CLAUDE.md asks of every new crate (CodeRabbit): it now
also gets the workspace's cognitive_complexity, too_many_arguments and wildcard_imports denies. The workspace's
unsafe_code is deny, not forbid, so the win32 module's #[allow(unsafe_code)] still applies, and an unsafe block
anywhere else in the crate fails to compile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CvoftKWm1wYSXdzRBwvFR3
2026-11-02 21:32:24 -08:00
insideTheFluxandClaude Opus 5.5 0b610c8307 LR-PREF-DISPLAY: an unreadable Windows advanced-colour state leaves previews sRGB
When the display configuration, the window's display path or its advanced-colour state can't be
read, `monitor_color` answered with the monitor's profile as if Windows weren't colour-managing the
desktop. If it was (HDR, Auto Color Management), previews were converted twice. It now answers
`Unknown`, as the crate's other failures do, so previews stay sRGB (Windows 10 before 1709 and
drivers that don't report the state included).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GfjNkJiMUagz3DN3zoV2rV
2026-10-25 22:05:23 -07:00
Claude 423d209d16 LR-PREF-DISPLAY: Windows previews follow the monitor's colour profile
While no monitor profile is chosen in Settings > Display, Windows now shows
previews through the profile Windows Color System assigns to the monitor
showing the window (per-user or system), as macOS and Linux already do. It is
read about once a second, so moving the window to another monitor and changing
the profile in Windows are followed without a restart. While Windows
colour-manages the desktop itself (HDR, Auto Color Management), previews stay
sRGB.

The Win32 calls live in a new L0 helper crate, crates/wincolor, the second
crate allowed `unsafe` after crates/sysmem (SAFETY comments on every block,
safe API, Unknown on any failure); CLAUDE.md and AGENTS.md name it. GDI's
GetICMProfileW keeps the profile a process first saw, so WCS is read directly
and GetICMProfileW is only a fallback.

The profile-file loader moves from the Linux-only colord.rs to a shared
profile_file.rs (unchanged), with a cache that re-reads a file only when it
changes.

Verified on Windows 11 by setting and clearing a Display P3 profile and
toggling HDR while the app ran.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K93HTyCiwYvbRGaAkjPvXn
2026-10-20 22:24:20 -07:00