Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/DynamoCoreWpf/Views/SplashScreen/SplashScreen.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,16 @@ private void LaunchDynamo(bool isCheckboxChecked)
viewModel.PreferenceSettings.EnableStaticSplashScreen = !isCheckboxChecked;
}
currentCloseMode = CloseMode.ByStartingDynamo;
Close();

dynamoView?.Show();
dynamoView?.Activate();

// Defer closing the splash screen until the dispatcher is idle.
// This method is invoked from a WebView2 JS-to-.NET callback, so calling Close()
// synchronously can trigger webView.Dispose() while still inside that callback,
// causing re-entrancy crashes. Showing dynamoView first ensures WPF always has a
// visible window, preventing ShutdownMode.OnLastWindowClose from terminating the app.
Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.ApplicationIdle, () => Close());
}

private void OnLoginStateChanged(LoginState state)
Expand Down
Loading