Skip to content

Commit

Permalink
Remove unused browser argument when creating WebView2 CompositionCont…
Browse files Browse the repository at this point in the history
…roller (#7530)
  • Loading branch information
krschau authored Aug 2, 2022
1 parent 33dfc7d commit 9670f76
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dev/WebView2/WebView2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -714,9 +714,8 @@ winrt::IAsyncAction WebView2::CreateCoreEnvironment() noexcept

if (!m_options)
{
// NOTE: To enable Anaheim logging, add: --enable-logging=stderr --v=1
// NOTE: To enable Anaheim logging, add: m_options.AdditionalBrowserArguments(L"--enable-logging=stderr --v=1");
m_options = winrt::CoreWebView2EnvironmentOptions();
m_options.AdditionalBrowserArguments(L"--enable-features=msEmbeddedBrowserVisualHosting");

auto applicationLanguagesList = winrt::ApplicationLanguages::Languages();
if (applicationLanguagesList.Size() > 0)
Expand Down Expand Up @@ -749,6 +748,8 @@ winrt::IAsyncAction WebView2::CreateCoreWebViewFromEnvironment(HWND hwndParent)
try
{
auto windowRef = winrt::CoreWebView2ControllerWindowReference::CreateFromWindowHandle(reinterpret_cast<UINT64>(hwndParent));
// CreateCoreWebView2CompositionController(Async) creates a CompositionController and is in visual hosting mode.
// Calling CreateCoreWebView2Controller would create a Controller and would be in windowed mode.
m_coreWebViewCompositionController = co_await m_coreWebViewEnvironment.CreateCoreWebView2CompositionControllerAsync(windowRef);
m_coreWebViewController = m_coreWebViewCompositionController.as<winrt::CoreWebView2Controller>();
m_coreWebViewController.ShouldDetectMonitorScaleChanges(false);
Expand Down

0 comments on commit 9670f76

Please sign in to comment.