Skip to content

Commit d7acb47

Browse files
committed
Holding Shift + clicking on the Close button will exit CompactGUI without minimising or showing the Watcher warning
1 parent 5dbd102 commit d7acb47

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

CompactGUI/ViewModels/MainViewModel.TrayHandler.vb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@ Partial Public Class MainViewModel
7878

7979
Private Sub Closing(e As CancelEventArgs)
8080
If e Is Nothing Then Return
81+
82+
If Keyboard.Modifiers = ModifierKeys.Shift Then
83+
e.Cancel = False
84+
Application.Current.Shutdown()
85+
Return
86+
End If
87+
8188
If Watcher.WatchedFolders.Count <> 0 Then
8289
e.Cancel = True
8390
WindowState = WindowState.Minimized

0 commit comments

Comments
 (0)