Repository navigation
fix: report the system accent colour consistently on Windows - #54405
Merged
MarshallOfSound merged 2 commits intoSep 25, 2026
Conversation
systemPreferences read HKCU\...\DWM\AccentColor directly for getAccentColor() but emitted 'accent-color-changed' with the DWM *colorization* colour from WM_DWMCOLORIZATIONCOLORCHANGED, formatted by a separate lowercase helper, so the event's newColor did not match getAccentColor() and the change de-duplication never matched on the first event. NativeWindowViews kept two more registry readers for the same key. Use ui::AccentColorObserver for all of it: it watches the DWM key, prefers the UISettings value Windows actually applies, and exposes ShouldUseAccentColorForWindowFrame(). This removes systemPreferences' hidden WS_POPUP broadcast window. Co-authored-by: Sam Attard <[email protected]>
…ations NativeWindowViews read the observer's cached colour from the WM_DWMCOLORIZATIONCOLORCHANGED / WM_SETTINGCHANGE handlers, which can run before the observer's registry watch has refreshed that cache, and nothing reapplied the colour afterwards. Subscribe to the observer instead and drop the message handlers. Also emit systemPreferences' accent-color-changed from a posted task rather than from inside the observer's notification. Co-authored-by: Sam Attard <[email protected]>
3 tasks done
MarshallOfSound
approved these changes
Sep 25, 2026
MarshallOfSound
enabled auto-merge (squash)
September 25, 2026 16:55
MarshallOfSound
deleted the
trop/45-x-y-bp-fix-report-the-system-accent-colour-consistently-on-windows-1790354525741
branch
September 25, 2026 19:07
|
Release Notes Persisted
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #54353
See that PR for details.
Notes: Fixed
accent-color-changedon Windows reporting a colour that differed fromsystemPreferences.getAccentColor().