Skip to content

Commit a9747ce

Browse files
Devenorxe16682.contractor
andauthored
* Workaround for electron/electron#49253 * If condition inverted and branches flipped --------- Co-authored-by: xe16682.contractor <xe16682.contractor@bbva.com>
1 parent db603b3 commit a9747ce

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/main/index.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,16 @@ function runApp() {
10551055

10561056
newWindow.on('minimize', () => {
10571057
if (trayOnMinimize) {
1058-
newWindow.hide()
1058+
// Workaround for https://github.com/electron/electron/issues/49253
1059+
if (process.platform === 'linux') {
1060+
setTimeout(() => {
1061+
newWindow.restore()
1062+
newWindow.hide()
1063+
}, 100)
1064+
} else {
1065+
newWindow.hide()
1066+
}
1067+
10591068
manageTray(newWindow)
10601069

10611070
if (newWindow === mainWindow) {

0 commit comments

Comments
 (0)