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). ------------- Commit messages: - Clear window background once when showing Changes: https://git.openjdk.org/jfx/pull/2316/files Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=2316&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8392595 Stats: 54 lines in 3 files changed: 31 ins; 17 del; 6 mod Patch: https://git.openjdk.org/jfx/pull/2316.diff Fetch: git fetch https://git.openjdk.org/jfx.git pull/2316/head:pull/2316 PR: https://git.openjdk.org/jfx/pull/2316
