File tree Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,10 @@ if (!gotTheLock) {
72
72
app . on ( 'second-instance' , ( event , argv ) => {
73
73
// Someone tried to run a second instance, we should focus our window.
74
74
if ( mainWindow ) {
75
- if ( mainWindow . isMinimized ( ) ) mainWindow . restore ( ) ;
75
+ mainWindow . show ( ) ;
76
+ if ( mainWindow . isMinimized ( ) ) {
77
+ mainWindow . restore ( ) ;
78
+ }
76
79
mainWindow . focus ( ) ;
77
80
78
81
if ( isWindows ) {
Original file line number Diff line number Diff line change @@ -22,7 +22,11 @@ export default class TrayIcon {
22
22
{
23
23
label : 'Show Franz' ,
24
24
click ( ) {
25
+ if ( app . mainWindow . isMinimized ( ) ) {
26
+ app . mainWindow . restore ( ) ;
27
+ }
25
28
app . mainWindow . show ( ) ;
29
+ app . mainWindow . focus ( ) ;
26
30
} ,
27
31
} , {
28
32
label : 'Quit Franz' ,
@@ -36,7 +40,11 @@ export default class TrayIcon {
36
40
this . trayIcon . setContextMenu ( trayMenu ) ;
37
41
38
42
this . trayIcon . on ( 'click' , ( ) => {
43
+ if ( app . mainWindow . isMinimized ( ) ) {
44
+ app . mainWindow . restore ( ) ;
45
+ }
39
46
app . mainWindow . show ( ) ;
47
+ app . mainWindow . focus ( ) ;
40
48
} ) ;
41
49
42
50
if ( process . platform === 'darwin' ) {
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import { URL } from 'url';
12
12
import Store from './lib/Store' ;
13
13
import Request from './lib/Request' ;
14
14
import { CHECK_INTERVAL , DEFAULT_APP_SETTINGS } from '../config' ;
15
- import { isMac , isLinux , isWindows } from '../environment' ;
15
+ import { isMac } from '../environment' ;
16
16
import locales from '../i18n/translations' ;
17
17
import { gaEvent , gaPage } from '../lib/analytics' ;
18
18
import { onVisibilityChange } from '../helpers/visibility-helper' ;
@@ -195,12 +195,11 @@ export default class AppStore extends Store {
195
195
} ) ;
196
196
197
197
this . actions . service . setActive ( { serviceId } ) ;
198
-
199
- if ( isWindows ) {
198
+ mainWindow . show ( ) ;
199
+ if ( app . mainWindow . isMinimized ( ) ) {
200
200
mainWindow . restore ( ) ;
201
- } else if ( isLinux ) {
202
- mainWindow . show ( ) ;
203
201
}
202
+ mainWindow . focus ( ) ;
204
203
}
205
204
} ;
206
205
}
You can’t perform that action at this time.
0 commit comments