File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -376,7 +376,10 @@ public MainForm()
376376 trayIcon . Text = "TorJet" ;
377377 trayIcon . Icon = LoadAppIcon ( ) ?? CreateTrayIcon ( ) ;
378378 trayIcon . ContextMenuStrip = trayMenu ;
379- trayIcon . DoubleClick += delegate { ShowFromTray ( ) ; } ;
379+ trayIcon . MouseClick += delegate ( object s , MouseEventArgs e )
380+ {
381+ if ( e . Button == MouseButtons . Left ) ShowFromTray ( ) ;
382+ } ;
380383
381384 Icon appIcon = LoadAppIcon ( ) ?? CreateTrayIcon ( ) ;
382385 Icon = appIcon ;
@@ -1028,7 +1031,7 @@ private void OnMouseDownAll(object s, MouseEventArgs e)
10281031 switch ( h )
10291032 {
10301033 case 1 : HandleCloseRequest ( ) ; break ;
1031- case 2 : MinimizeToTray ( ) ; break ;
1034+ case 2 : WindowState = FormWindowState . Minimized ; break ;
10321035 case 5 : OnConnectButton ( ) ; break ;
10331036 case 20 : ApplyProxyToggle ( ! ProxyIsOurs ( ) ) ; break ;
10341037 case 30 : page = Page . Settings ; settingsScrollY = 0 ; CancelEdit ( ) ; LayoutPass ( ) ; Invalidate ( ) ; break ;
You can’t perform that action at this time.
0 commit comments