I can confirm that this problem exists for DECORATED, EXTENDED,
UNIFIED, and UTILITY stage styles. It does seem to be more noticeable
with EXTENDED, but it's still sometimes noticeable for the other
styles. It doesn't seem to appear for UNDECORATED and TRANSPARENT
stage styles.

This seems to be a preexisting problem:
https://bugs.openjdk.org/browse/JDK-8088179
However, the fix seems to have been reverted later:
https://bugs.openjdk.org/browse/JDK-8171852

Firefox seems to have had the same problem:
https://bugzilla.mozilla.org/show_bug.cgi?id=1824053
They solved the problem by setting the DWMWA_CLOAK flag on the window,
then painting the window with the initial color, and then uncloaking
the window once done.
However, they later reverted that fix because they noticed that
cloaking the window also hides its opening animation:
https://bugzilla.mozilla.org/show_bug.cgi?id=1906358

In the last bug report, they say that the white flash is caused by
redirection bitmaps (which might be initially white?), and disabling
them with WS_EX_NOREDIRECTIONBITMAP might solve the problem.

However, a window without redirection bitmap would need to use
DirectComposition to actually show its content. We can't easily use
DirectComposition with D3D9, since it requires D3D11 (there's a way to
do it still, because resources can be shared between D3D9 and D3D11).

The DComp fix might also be implemented for the D3D12 pipeline only,
once that lands.

Reply via email to