cycfi / elements

Elements C++ GUI library
http://cycfi.github.io/elements/
3.15k stars 235 forks source link

Window starts with a black screen #432

Open wltyzh opened 2 weeks ago

wltyzh commented 2 weeks ago

When the window starts up, I first see a black background and only then the drawn elements appears. Can this be avoided?

djowel commented 2 weeks ago

Happens in debug mode right? And it happens only once, correct? If not please provide more context for repro.

wltyzh commented 2 weeks ago

I tested the release environment and still have the problem. I used the TextEdit example, other examples should be the same. You can take a look at the screenshot. Snipaste_2024-11-08_15-22-55 Snipaste_2024-11-08_15-23-29

djowel commented 2 weeks ago

I think Windows takes time to initialize some things at startup, probably in a different thread. Maybe you can try delaying the showing of the window until the app stabilizes.

These are just assumptions. In any case, this issue needs further investigation.