1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

WebBrowserComponent: Windows: Avoid flash to default JUCE background colour

The default background colour of the WebBrowserComponent is white on all
platforms. Before the first page finishes loading this is the colour
that should fill the WebBrowserComponent's area.

Prior to this change however, on Windows a sudden flash to the default
JUCE background colour would occur, before the default white background
could take effect.

At the time of this commit there is a known issue with the
icorewebview2controller2, where a white flash is inevitable, unless the
WEBVIEW2_DEFAULT_BACKGROUND_COLOR environment variable is set. Using
a white background behind the WebView avoids this issue.
This commit is contained in:
attila 2024-07-11 13:36:07 +02:00
parent 8642cfe6b3
commit 7ead20d575

View file

@ -491,11 +491,10 @@ public:
void fallbackPaint (Graphics& webBrowserComponentContext) override
{
webBrowserComponentContext.fillAll (Colours::white);
if (! hasBrowserBeenCreated())
{
webBrowserComponentContext.fillAll (Colours::white);
checkWindowAssociation();
}
}
void focusGainedWithDirection (FocusChangeType, FocusChangeDirection direction) override