Skip to content

Commit

Permalink
Don't minimize to the tray icon if there is no tray icon.
Browse files Browse the repository at this point in the history
  • Loading branch information
sedwards2009 committed Dec 21, 2018
1 parent 1af2d5d commit fa38971
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions extraterm/src/main_process/Main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ function maximizeAllWindows(): void {
function minimizeAllWindows(): void {
for (const window of BrowserWindow.getAllWindows()) {
const generalConfig = <GeneralConfig> configDatabase.getConfig(GENERAL_CONFIG);
if (generalConfig.minimizeToTray) {
if (generalConfig.showTrayIcon && generalConfig.minimizeToTray) {
window.hide();
} else {
window.minimize();
Expand All @@ -291,7 +291,7 @@ function restoreAllWindows(): void {
const bounds = generalConfig.windowConfiguration[0];
window.setBounds(bounds);
window.setMinimumSize(bounds.width, bounds.height);
if (generalConfig.minimizeToTray) {
if (generalConfig.showTrayIcon && generalConfig.minimizeToTray) {
window.show();
}
window.restore();
Expand All @@ -302,7 +302,7 @@ function restoreAllWindows(): void {
} else {

// Windows and macOS
if (generalConfig.minimizeToTray) {
if (generalConfig.showTrayIcon && generalConfig.minimizeToTray) {
window.show();
}
window.restore();
Expand Down

0 comments on commit fa38971

Please sign in to comment.