fix(windows): hide windows on cleanup (#9612)

* Hide windows on cleanup

* Add change file

* Move hide window to a loop above
This commit is contained in:
Tony 2024-04-30 23:37:17 +08:00 committed by GitHub
parent 108ab9094a
commit 6c047aee14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 2 deletions

View File

@ -0,0 +1,5 @@
---
"tauri": "patch:bug"
---
Fix window white flashing on exit on Windows

View File

@ -772,10 +772,12 @@ macro_rules! shared_app_impl {
#[cfg(all(desktop, feature = "tray-icon"))]
self.manager.tray.icons.lock().unwrap().clear();
self.manager.resources_table().clear();
for (_, window) in self.manager.windows().iter() {
for (_, window) in self.manager.windows() {
window.resources_table().clear();
#[cfg(windows)]
let _ = window.hide();
}
for (_, webview) in self.manager.webviews().iter() {
for (_, webview) in self.manager.webviews() {
webview.resources_table().clear();
}
}