Fixing the White Flash in Dark Mode: Microsoft Edge & Chrome Update

  • Thread Author
Imagine this: you're surfing the web late at night, all cozy in your self-imposed bat cave, your PC's theme is perfectly set to dark mode for that immersive feel. Then, BOOM — you open a new tab in Microsoft Edge or Google Chrome, and there it is. That retina-burning white flash. For a moment, you wonder if Microsoft or Google has conspired to turn night owls into squinting, light-sensitive creatures. Good news, though — Microsoft is finally taking steps to resolve this annoyance, which has plagued countless users on both Windows 11 and Windows 10! Let’s dive into the specifics of this fix and why it’s about time.

The Cause of the Chrome & Edge Dark Mode Dilemma​

The infamous white flash occurs when users open a new browser window in either Edge or Chrome while dark mode is enabled. It’s like a visual equivalent of your neighbor suddenly switching floodlights on while you’re stargazing — jarring, unnecessary, and downright disruptive.
Here’s the root of the issue: when a window is created in Windows, there’s often a brief moment where Windows itself takes responsibility before handing control over to the application. Specifically, the default Desktop Window Manager (DWM.exe) used by Windows assumes "white background supremacy" until notified otherwise. Apps like Chrome or Edge aren’t fast enough to overwrite that white canvas with your soothing dark theme during the window's creation phase. Round of applause for workflow inefficiency, right?
This behavior has been around for a while. Windows’ own File Explorer suffered from the same problem, but it was resolved in Windows 11 23H2. Now it's Chrome and Edge’s turn for a facelift.

The Big Fix: Microsoft’s Cloaking Magic​

In an update to Chromium (the open-source engine powering both Chrome and Edge), Microsoft proposes a clever workaround. Here’s a nerdy breakdown of how the fix works:
  • Default White Background Issue:
    Whenever a new window is created in Chromium-based browsers, DWM kicks in and applies a white background until the app is ready to do its thing. This is a deep-seated behavior tied to how the Windows system handles window rendering.
  • Cloaking Solution:
    Chris Davis, a Microsoft engineer, suggested leveraging cloaking. Cloaking essentially makes a window “invisible” (hidden from view temporarily) during its creation period. While the window is still cloaked:
  • Windows fills the client area (the active part of the window) with a dark background.
  • The cloak stays in place until the application is ready to render its proper dark-themed visuals.
  • Sequence of Events:
  • Window is created → DWM enables cloaking (DWMWA_CLOAK flag: TRUE).
  • Using legacy GDI (Graphics Device Interface) calls, the client area is manually painted dark.
  • Once the painting is completed, the cloak is lifted (DWMWA_CLOAK flag: FALSE).
  • By the time the user sees the window, dark colors are already in place — no pesky flashes.

What About the Risks?​

While the solution might sound foolproof, it’s worth noting that some Chromium contributors raised eyebrows at the potential concerns:
  • Race Conditions: Imagine a situation where the browser’s rendering of web content (like images) happens faster than expected. This could lead to scenarios where the dark background applied during cloaking gets overwritten by Chromium at the wrong time, creating visual artifacts — potentially defeating the purpose of the fix.
  • Temporary Workaround, Not a Root Solution: The cloaking method is a patch, not the ultimate solution. Microsoft and Google are exploring long-term fixes, such as tweaking how top-level windows are managed by Chromium. Potential candidates for future improvements include techniques like using WS_EX_NOREDIRECTIONBITMAP flags or APIs such as DWM_SYSTEMBACKDROP_TYPE.
For now, though, the cloak-and-dagger approach seems solid, as Microsoft ran internal tests with no noticeable issues.

When Can You Expect the Update?​

This fix isn’t vaporware — which is great because browser updates have been historically unpredictable. According to the Chromium commit logs and Microsoft’s own announcements, the update will roll out soon to both Google Chrome and Microsoft Edge. For those running Windows 10 or Windows 11, the dreaded white flash in dark mode might shortly be a thing of the past.
While you’ll need to keep your Chrome or Edge browser updated to get these changes, as usual, the update should silently roll in via Chromium’s regular release cycle.

Why Now? The Bigger Picture​

If you’ve been following the ongoing love story of Microsoft’s embrace of Chromium for Edge, you’ll know it’s been a win-win for both Chrome and Edge users. The switch to Chromium gave Edge a major boost in performance, compatibility, and adoption. But perhaps an underrated advantage of this collaboration lies in how Microsoft fixes issues that don’t originate in its own backyard. These fixes trickle down to Chrome, benefiting millions who don’t even use Edge. Talk about gaming the goodwill economy.
From better scrolling support to optimized power usage during media playback, Microsoft’s contributions to Chromium are slowly but surely closing the gap between Edge and Chrome in the dark mode experience.

TL;DR Summary​

  • Problem: When you open a new browser window in Microsoft Edge or Google Chrome in dark mode, a white flash briefly illuminates your screen due to how Windows handles window creation.
  • Solution: Microsoft is deploying a fix to Chromium that uses window cloaking to suppress the white flash and apply a dark background before the user sees the window.
  • Risks: Minor concerns about race conditions and whether dark coloring might not always render correctly.
  • Rollout: The fix will arrive in future updates for Chrome and Edge.
So, dear dark-mode enthusiasts, relief is (literally) on the horizon. Your late-night browsing sessions will soon become a seamless, uninterrupted darkness. No more flash-bang moments to break your concentration. It’s yet another example of Microsoft making strides where it matters most.
Now it’s up to you to keep bragging about how cool dark mode is to your friends who still inexplicably love their blinding white themes.
Question for the forum: Do you often use dark mode on Windows? Have you experienced this irritating “white flash” in browsers? Let’s hash it out!

Source: Windows Latest Microsoft finally fixing Chrome & Edge’s white flash in dark mode on Windows 11 & Windows 10
 


Back
Top