From 541e606a304d862c12c7c5ee814a3d21fcef2094 Mon Sep 17 00:00:00 2001 From: amrbashir Date: Thu, 27 Oct 2022 14:04:15 +0200 Subject: [PATCH] fix: restore webview2 visibility upon restoring a maximized window regression was introduce in https://github.com/tauri-apps/wry/pull/702 --- src/webview/webview2/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/webview/webview2/mod.rs b/src/webview/webview2/mod.rs index 4cae8e740..1e7af7afe 100644 --- a/src/webview/webview2/mod.rs +++ b/src/webview/webview2/mod.rs @@ -698,7 +698,9 @@ window.addEventListener('mousemove', (e) => window.chrome.webview.postMessage('_ let _ = (*controller).SetIsVisible(false); } - if wparam == WPARAM(win32wm::SIZE_RESTORED as _) { + if wparam == WPARAM(win32wm::SIZE_RESTORED as _) + || wparam == WPARAM(win32wm::SIZE_MAXIMIZED as _) + { let _ = (*controller).SetIsVisible(true); } }