Desktop: Fix resize helper window Z-order and attach to parent console on Windows (#3572)

* Desktop: Fix helper window zorder on Windows

* Attach to parent console if launched from a terminal

* Workaround for a Windows-specific exception that occurs when `app` is dropped
This commit is contained in:
Timon
2026-01-05 23:02:41 +00:00
committed by GitHub
parent fafc687d84
commit bd1f7eefdb
4 changed files with 25 additions and 9 deletions
+8
View File
@@ -93,6 +93,14 @@ pub fn start() {
let mut app = App::new(Box::new(cef_context), cef_view_info_sender, wgpu_context, app_event_receiver, app_event_scheduler, cli.files);
event_loop.run_app(&mut app).unwrap();
// Workaround for a Windows-specific exception that occurs when `app` is dropped.
// The issue causes the window to hang for a few seconds before closing.
// Appears to be related to CEF object destruction order.
// Calling `exit` bypasses rust teardown and lets Windows perform process cleanup.
// TODO: Identify and fix the underlying CEF shutdown issue so this workaround can be removed.
#[cfg(target_os = "windows")]
exit(0);
}
pub fn start_helper() {