Skip to content

Commit

Permalink
fix: Notification Exit context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
christiankyle-ching committed Mar 18, 2022
1 parent 1191bf5 commit 73d26e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DigitalWellbeingWPF/Helpers/Notifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ static Notifier()
// Context Menu : Exit App
ctx.Items.Add("Exit", null, (s, e) =>
{
mWindow.Close();
mWindow.ForceClose();
});

// Always visible for notifications to work
Expand Down
5 changes: 5 additions & 0 deletions DigitalWellbeingWPF/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ public void RestoreWindow()
usagePage.OnNavigate();
}

public void ForceClose()
{
Application.Current.Shutdown();
}

private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
if (Properties.Settings.Default.MinimizeOnExit)
Expand Down

0 comments on commit 73d26e5

Please sign in to comment.