From 909da72eb24fd7f66437cabbf786a116f45208ec Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Mon, 21 Jun 2021 15:39:26 +1000 Subject: [PATCH] [windows] Support StartHidden flag --- v2/internal/ffenestri/ffenestri_windows.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/v2/internal/ffenestri/ffenestri_windows.cpp b/v2/internal/ffenestri/ffenestri_windows.cpp index 2c53e432..77d9da0f 100644 --- a/v2/internal/ffenestri/ffenestri_windows.cpp +++ b/v2/internal/ffenestri/ffenestri_windows.cpp @@ -263,6 +263,11 @@ void completed(struct Application* app) { delete[] app->initialCode; app->initialCode = nullptr; + // Fix for webview2 bug: https://github.com/MicrosoftEdge/WebView2Feedback/issues/1077 + // Will be fixed in next stable release + app->webviewController->put_IsVisible(false); + app->webviewController->put_IsVisible(true); + if( app->startupURL == nullptr ) { messageFromWindowCallback("SS"); return; @@ -306,6 +311,8 @@ bool initWebView2(struct Application *app, int debugEnabled, messageCallback cb) if ( debugEnabled == 0 ) { settings->put_AreDefaultContextMenusEnabled(FALSE); } + // Fix for invisible webview + if( app->startHidden ) {} flag.clear(); })); if (!SUCCEEDED(res))