Skip to content

Commit

Permalink
Exit on closing when any modifier key is pressed
Browse files Browse the repository at this point in the history
  • Loading branch information
berrnd committed Dec 7, 2024
1 parent 6108aec commit 5b1e8d3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions UI/FrmMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ private void ConfigFileWatcher_Changed(object sender, FileSystemEventArgs e)

private void FrmMain_FormClosing(object sender, FormClosingEventArgs e)
{
if (Control.ModifierKeys == Keys.Shift)
if (Control.ModifierKeys == Keys.None)
{
this.Shutdown();
e.Cancel = true;
this.Hide();
}
else
{
e.Cancel = true;
this.Hide();
this.Shutdown();
}
}

Expand Down

0 comments on commit 5b1e8d3

Please sign in to comment.