On Thu, 17 Sep 2026 23:12:34 GMT, Michael Strauß <[email protected]> wrote:

> On Windows, a stage with a dark background can briefly be seen with a white 
> background until JavaFX renders the first frame.
> This was initially observed and fixed by erasing the white background with 
> the scene fill color in 
> [JDK-8088179](https://bugs.openjdk.org/browse/JDK-8088179).
> However, since this caused resize flicker, the fix was reverted in 
> [JDK-8171852](https://bugs.openjdk.org/browse/JDK-8171852).
> 
> A better solution is to manually erase the background until the first 
> `WM_PAINT` message is received, and then stop doing so. This solves both 
> problems: it prevents the initial white flash, and it also prevents resize 
> flicker.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Tested changes and verified flash is gone. Code looks good.

I was having problems reproducing the flash when window creation was animated. 
I turned this off using Accessibility > Visual Effects > Animation effects.

-------------

Marked as reviewed by mfox (Committer).

PR Review: https://git.openjdk.org/jfx/pull/2316#pullrequestreview-5270457631

Reply via email to