Skip to content

Commit 73d26e5

Browse files
fix: Notification Exit context menu
1 parent 1191bf5 commit 73d26e5

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

DigitalWellbeingWPF/Helpers/Notifier.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ static Notifier()
5656
// Context Menu : Exit App
5757
ctx.Items.Add("Exit", null, (s, e) =>
5858
{
59-
mWindow.Close();
59+
mWindow.ForceClose();
6060
});
6161

6262
// Always visible for notifications to work

DigitalWellbeingWPF/MainWindow.xaml.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,11 @@ public void RestoreWindow()
142142
usagePage.OnNavigate();
143143
}
144144

145+
public void ForceClose()
146+
{
147+
Application.Current.Shutdown();
148+
}
149+
145150
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
146151
{
147152
if (Properties.Settings.Default.MinimizeOnExit)

0 commit comments

Comments
 (0)