fix: destroy miniplayer window before app exit

WebKit's WebProcess was crashing (SIGABRT) during EGL/GPU resource
cleanup when the app exited with the miniplayer window still alive.
Now explicitly destroy the miniplayer window before the main process
exits, giving WebKit time to clean up gracefully.
This commit is contained in:
vicrodh committed 2026-02-26 13:34:30 -06:00
1 parent 5ceafc881c
commit 0ee79d8a69
1 file changed
+7
+7
View File
@@ -920,6 +920,13 @@ pub fn run() {
let _ = window.hide();
api.prevent_close();
} else {
// Close MiniPlayer window first so WebKit can clean up
// its GPU/EGL resources gracefully before the process exits.
if let Some(mini) = window.app_handle().webview_windows().get("miniplayer") {
log::info!("App closing: destroying miniplayer window");
let _ = mini.destroy();
}
// Cleanup cast devices on actual close
log::info!("App closing: cleaning up cast devices");