When I check the "Show color in title bar" checkbox in Windows accent color settings I would expect Firefox to instantly change to the Windows accent color (like the settings screen does). It doesn't.
Jonathan, can we enable this somehow?
Created attachment 8884696 [details] [diff] [review] patch The '-moz-win-accentcolor' keyword is already live to changes to the color that is chosen for the Windows 10 accent color. This patch is required to invalidate the cached result of the '-moz-windows-accent-color-applies' media query when the Windows 10 accent color is enabled/disabled in the Windows settings.
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/33f7f73ffb36 Make the '-moz-windows-accent-color-applies' media query live to Windows 10 settings changes. r=dholbert
This doesn't seem to be working for me. In a current (7/20) Nightly, when I enable the Win10 option to show the titlebar accent color, I still have to restart Firefox for it to take effect (otherwise it continues to just show the default Firefox theme). Ditto for disabling the Windows setting (Firefox continues to use the accent color until it is restarted). The color itself will update w/o a restart when I change it from the Windows dialog.
[I think you meant to needinfo the patch-author, jwatt, who conveniently is back as of today according to his Bugzilla nick. Transferring ni.]
After using this on Windows for a few days it seems like certain actions e.g. minimizing the browser window or opening a new window will cause the setting to apply correctly. We probably need to do out whatever these actions are doing to reset/invalidate the accent color.
> need to do out Sigh, this was originally "find out" but I'm trying to say "we need to do whatever these actions are doing".
Strange. This works for certain windows such as the Browser Console. I'm pretty sure I was just using regular windows when I tested this though.
(In reply to Johann Hofmann [:johannh] from comment #9) > After using this on Windows for a few days it seems like certain actions > e.g. minimizing the browser window or opening a new window will cause the > setting to apply correctly. When resizing the window etc. causes the visual appearance to correctly refresh we end up getting the media query value under the stack: GetSystemMetric nsMediaQueryResultCacheKey::Matches nsCSSRuleProcessor::RefreshRuleCascade nsCSSRuleProcessor::MediumFeaturesChanged nsStyleSet::MediumFeaturesChanged mozilla::StyleSetHandle::Ptr::MediumFeaturesChanged nsPresContext::MediaFeatureValuesChanged nsPresContext::FlushPendingMediaFeatureValuesChanged mozilla::PresShell::DoFlushPendingNotifications nsIPresShell::FlushPendingNotifications mozilla::PresShell::DoFlushPendingNotifications nsIPresShell::FlushPendingNotifications nsDocument::FlushPendingNotifications mozilla::dom::BoxObject::GetPresShell mozilla::dom::BoxObject::GetFrame mozilla::dom::BoxObject::GetOffsetRect mozilla::dom::BoxObject::GetWidth mozilla::dom::BoxObject::Width mozilla::dom::BoxObjectBinding::get_width It looks like the patch I needed really should be calling nsPresContext::MediaFeatureValuesChanged too.
Created attachment 8890350 [details] [diff] [review] part 2 - Invalidate and notify when clearing cached media features for Windows accent c olor changes
Comment on attachment 8890350 [details] [diff] [review] part 2 - Invalidate and notify when clearing cached media features for Windows accent c olor changes Review of attachment 8890350 [details] [diff] [review]: ----------------------------------------------------------------- r=me
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/6db4b0af686c part 2 - Invalidate and notify when clearing cached media features for Windows accent color changes. r=dholbert
I tested this on Windows 10 with FF Nightly 57.0a1(2017-08-16) and I still can reproduce this issue.
As best I can tell we have some sort of race when there are multiple top level windows. Sometimes it works, sometimes it doesn't. Annoyingly it usually works when Firefox is run from a debugger with breakpoints set. Ovidiu, did you notice any particular pattern of interaction that would cause it to work or not work?