Skip to content

Commit b2f0951

Browse files
author
xe16682.contractor
committed
Workaround for electron/electron#49253
1 parent 3afcc8e commit b2f0951

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
@@ -1052,7 +1052,16 @@ function runApp() {
10521052

10531053
newWindow.on('minimize', () => {
10541054
if (trayOnMinimize) {
1055-
newWindow.hide()
1055+
// Workaround for https://github.com/electron/electron/issues/49253
1056+
if (process.platform !== 'linux') {
1057+
newWindow.hide()
1058+
} else {
1059+
setTimeout(() => {
1060+
newWindow.restore()
1061+
newWindow.hide()
1062+
}, 100)
1063+
}
1064+
10561065
manageTray(newWindow)
10571066

10581067
if (newWindow === mainWindow) {

0 commit comments

Comments
 (0)