Skip to content

Commit

Permalink
Hide the dock icon if it becomes visible
Browse files Browse the repository at this point in the history
  • Loading branch information
KYDronePilot committed Dec 11, 2020
1 parent 30f36fb commit efb9fe9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ const mb = menubar({
resizable: false,
movable: false
},
windowPosition
windowPosition,
showDockIcon: false
})

/**
Expand Down Expand Up @@ -204,6 +205,10 @@ mb.on('after-create-window', () => {
})

mb.on('show', () => {
// Tends to like to make itself visible when a new window is opened
if (process.platform === 'darwin' && app.dock.isVisible()) {
app.dock.hide()
}
visibilityChangeAlert(true)
setWindowVisibility(true)

Expand Down

0 comments on commit efb9fe9

Please sign in to comment.