From 7da7bf3f1338dbed7aac214e01f6ec661832b525 Mon Sep 17 00:00:00 2001 From: Ngo Iok Ui Date: Wed, 24 Mar 2021 13:06:58 +0800 Subject: [PATCH 1/2] Fix visibility on webview2 when window was invisible previously We set webview2 to be always visible for simplicity. This is more of a workaround. Microsoft is also working to fix it: https://github.com/MicrosoftEdge/WebView2Feedback/issues/1077 --- src/webview/win/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/webview/win/mod.rs b/src/webview/win/mod.rs index c230ef3a6..7577490c2 100644 --- a/src/webview/win/mod.rs +++ b/src/webview/win/mod.rs @@ -180,6 +180,7 @@ impl WV for InnerWebView { } } + controller.put_is_visible(true); let _ = controller_clone.set(controller); if let Some(file_drop_handler) = file_drop_handler { From 7aa672a689a05d84967c6cac5defe54e081d0e25 Mon Sep 17 00:00:00 2001 From: Ngo Iok Ui Date: Wed, 24 Mar 2021 13:10:34 +0800 Subject: [PATCH 2/2] Add changes file --- .changes/visible.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changes/visible.md diff --git a/.changes/visible.md b/.changes/visible.md new file mode 100644 index 000000000..2f4a422b4 --- /dev/null +++ b/.changes/visible.md @@ -0,0 +1,6 @@ +--- +"wry": patch +--- + +Fix visibility on webview2 when window was invisible previously and then shown. +