File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,17 @@ app.on('window-all-closed', () => {
4848// Fix transparency issues on Linux
4949app . disableHardwareAcceleration ( ) ;
5050
51+ // Single instance
52+ if ( app . makeSingleInstance ( ( ) => {
53+ if ( trayWindow ) {
54+ trayWindow . show ( ) ;
55+ trayWindow . focus ( ) ;
56+ }
57+ } ) ) {
58+ app . quit ( ) ;
59+ process . exit ( ) ;
60+ }
61+
5162app . on ( 'ready' , ( ) => {
5263 setTimeout ( ( ) => {
5364 gtt . _dump ( 'Running on ' + gtt . _platform ) ;
@@ -563,7 +574,10 @@ process.on('uncaughtException', function (e) {
563574 Raven . config ( 'https://62cb30e3c06945b7960d624de45ed322@sentry.io/1218774' ) . install ( ) ;
564575 Raven . captureException ( e ) ;
565576 console . log ( "done." ) ;
566- setTimeout ( process . exit , 5000 ) ;
577+ setTimeout ( ( ) => {
578+ app . quit ( ) ;
579+ process . exit ( ) ;
580+ } , 5000 ) ;
567581 return ;
568582 }
569583
You can’t perform that action at this time.
0 commit comments