Flutter Windows Multi-Window Focus Bug Fixed, but Impeller Breaks Thin Lines
Flutter desktop apps that use multi-window or rely on precise thin-line rendering will hit these issues immediately. The focus fix unblocks a whole class of desktop productivity apps, but the Impeller defect means any canvas drawing with sub-pixel strokes or alpha will look broken until the shader is patched.
A multi-window focus bug in Flutter Windows has been resolved after a root-cause analysis uncovered three interacting flaws. The engine was re-focusing the main window even on deactivation messages, the framework was incorrectly nesting child window focus scopes under the parent, and no check existed to prevent a window from stealing focus when another was already active. The fix addresses all three, making multi-window apps on Windows stable for the first time.
Merging that fix immediately surfaced a new problem: Flutter Windows is now enabling Impeller by default. The new renderer's SDF-based anti-aliasing adds a fixed-width transition band around strokes, so a 0.75 physical-pixel line renders as a solid 2-pixel-wide line with blur. Alpha values are also completely ignored because the SDF stroke shader clamps the minimum width to 1 pixel without proportionally reducing opacity.
Workarounds include replacing drawLine with drawRect, forcing Skia via a flag, or sticking to integer pixel widths. The rendering defect mirrors the teething problems Impeller had on Android, underscoring the maintenance burden of a custom rendering stack.
The Impeller defect is a textbook case of a fixed-function SDF pipeline failing where an analytical rasterizer handled edge cases correctly. The smoothstep transition band is a constant added to coverage, so it dominates thin strokes and becomes invisible on thick ones, which is why the multiplier drops from 2.7× to 1.25× as stroke width increases.
Alpha being ignored is not a separate bug but a consequence of the same minimum-width clamp. The shader forces every stroke to at least 1 pixel wide at full opacity, which is the opposite of Skia's sub-pixel approach that scales alpha to simulate thinner lines. Fixing this requires threading alpha into the width-clamping logic.
The multi-window focus bug is a reminder that desktop window management is full of implicit state machines. Three separate layers — the OS, the engine, and the framework — each made a reasonable local decision that combined into a broken global behavior.