From 857aae8493d7a62f90f6c7fe7148d53c65f0caf9 Mon Sep 17 00:00:00 2001 From: Tim-Paik Date: Wed, 6 Apr 2022 23:15:58 +0800 Subject: [PATCH] fix windows window resize bug --- neutauri_bundler/src/dev.rs | 4 +++- neutauri_runtime/src/main.rs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/neutauri_bundler/src/dev.rs b/neutauri_bundler/src/dev.rs index 71980f1..8efecd2 100644 --- a/neutauri_bundler/src/dev.rs +++ b/neutauri_bundler/src/dev.rs @@ -191,7 +191,9 @@ pub fn dev(config_path: String) -> wry::Result<()> { event: WindowEvent::CloseRequested, .. } => *control_flow = ControlFlow::Exit, - _ => (), + _ => { + let _ = webview.resize(); + } } }); } diff --git a/neutauri_runtime/src/main.rs b/neutauri_runtime/src/main.rs index aff4e8b..0ae356c 100644 --- a/neutauri_runtime/src/main.rs +++ b/neutauri_runtime/src/main.rs @@ -180,7 +180,9 @@ fn main() -> wry::Result<()> { event: WindowEvent::CloseRequested, .. } => *control_flow = ControlFlow::Exit, - _ => (), + _ => { + let _ = webview.resize(); + } } }); }