diff --git a/NLUL.GUI/Component/TopBar.xaml.cs b/NLUL.GUI/Component/TopBar.xaml.cs index 8bd49c5..975c490 100644 --- a/NLUL.GUI/Component/TopBar.xaml.cs +++ b/NLUL.GUI/Component/TopBar.xaml.cs @@ -4,6 +4,7 @@ * Top bar of the main window. */ +using System.Diagnostics; using Avalonia.Controls; using Avalonia.Markup.Xaml; using Avalonia.Media; @@ -35,7 +36,11 @@ public TopBar() this.window.WindowState = WindowState.Minimized; } }; - this.Get("Close").ButtonPressed += (sender, args) => window?.Close(); + this.Get("Close").ButtonPressed += (sender, args) => + { + window?.Close(); + Process.GetCurrentProcess().Kill(); + }; // Set the background for accepting events. this.Background = new SolidColorBrush(new Color(0,0,0,0));