diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Tray.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/lib/Tray.js b/src/lib/Tray.js index b36f4de7e..655dc416f 100644 --- a/src/lib/Tray.js +++ b/src/lib/Tray.js | |||
@@ -30,7 +30,7 @@ export default class TrayIcon { | |||
30 | visible = false; | 30 | visible = false; |
31 | 31 | ||
32 | isAppMuted = false; | 32 | isAppMuted = false; |
33 | 33 | ||
34 | mainWindow = null; | 34 | mainWindow = null; |
35 | 35 | ||
36 | trayMenuTemplate = (tray) => [ | 36 | trayMenuTemplate = (tray) => [ |
@@ -65,7 +65,7 @@ export default class TrayIcon { | |||
65 | 65 | ||
66 | this.mainWindow = BrowserWindow.getAllWindows()[0]; | 66 | this.mainWindow = BrowserWindow.getAllWindows()[0]; |
67 | 67 | ||
68 | // listen to window events to be able to set correct string | 68 | // listen to window events to be able to set correct string |
69 | // to tray menu ('Hide Ferdi' / 'Show Ferdi') | 69 | // to tray menu ('Hide Ferdi' / 'Show Ferdi') |
70 | this.mainWindow.on('hide', () => { | 70 | this.mainWindow.on('hide', () => { |
71 | this._updateTrayMenu(null); | 71 | this._updateTrayMenu(null); |
@@ -143,7 +143,13 @@ export default class TrayIcon { | |||
143 | if (mainWindow.isMinimized()) { | 143 | if (mainWindow.isMinimized()) { |
144 | mainWindow.restore(); | 144 | mainWindow.restore(); |
145 | } else if (mainWindow.isVisible() && mainWindow.isFocused()) { | 145 | } else if (mainWindow.isVisible() && mainWindow.isFocused()) { |
146 | mainWindow.hide(); | 146 | if (isMac && mainWindow.isFullScreen()) { |
147 | mainWindow.once('show', () => mainWindow?.setFullScreen(true)); | ||
148 | mainWindow.once('leave-full-screen', () => mainWindow?.hide()); | ||
149 | mainWindow.setFullScreen(false); | ||
150 | } else { | ||
151 | mainWindow.hide(); | ||
152 | } | ||
147 | } else { | 153 | } else { |
148 | mainWindow.show(); | 154 | mainWindow.show(); |
149 | mainWindow.focus(); | 155 | mainWindow.focus(); |