mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-24 10:18:13 +08:00
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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user