Skip to content

Commit

Permalink
Upgrade to Electron 4.2.11
Browse files Browse the repository at this point in the history
Fix #65

Notes:
  * Deprecation of `app.makeSingleInstance` https://github.com/electron/electron/blob/master/docs/api/breaking-changes.md#appmakesingleinstance
  * On Arch Linux with OpenBox, `app.dock` is `undefined`
  * Version 1.8.2 of Electron crashes with `Harfbuzz version too old`, but
    not Electron 1.8.3
  • Loading branch information
JulioJu committed Oct 16, 2019
1 parent 2ad66f5 commit a014515
Show file tree
Hide file tree
Showing 3 changed files with 1,817 additions and 1,752 deletions.
9 changes: 6 additions & 3 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,14 @@ bugsnag.register('032040bba551785c7846442332cc067f', {
releaseStage: releaseStage
})

const shouldQuit = app.makeSingleInstance((commandLine, workingDirectory) => {
const shouldQuit = app.requestSingleInstanceLock()
app.on('second-instance', (event, commandLine, workingDirectory) => {
// Someone tried to run a second instance, we should focus our window.
if (displayManager) {
displayManager.showMain()
}
})
if (shouldQuit) {
if (!shouldQuit) {
app.exit()
}

Expand Down Expand Up @@ -191,7 +192,9 @@ function newTransparentOnTopWindow(
}

function onReady() {
app.dock.hide() // needed to support fullscreen mode in OS X, see https://github.com/electron/electron/issues/3302
if (app.dock) {
app.dock.hide() // needed to support fullscreen mode in OS X, see https://github.com/electron/electron/issues/3302
}
displayManager = new DisplayManager(
transparencyDisabled,
bugsnag,
Expand Down
Loading

0 comments on commit a014515

Please sign in to comment.