Skip to content

Commit

Permalink
Fix visibility on webview2 when window was invisible previously (#128)
Browse files Browse the repository at this point in the history
* 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:
MicrosoftEdge/WebView2Feedback#1077

* Add changes file
  • Loading branch information
Ngo Iok Ui (Wu Yu Wei) authored Mar 24, 2021
1 parent 485035f commit 6d31706
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changes/visible.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"wry": patch
---

Fix visibility on webview2 when window was invisible previously and then shown.

1 change: 1 addition & 0 deletions src/webview/win/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 6d31706

Please sign in to comment.