Skip to content

Commit

Permalink
Pause on sleep rather than wake
Browse files Browse the repository at this point in the history
  • Loading branch information
bcomnes committed Aug 2, 2018
1 parent d05d918 commit 5c49015
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ app.on('ready', function appReady () {
MediaPlayPause: playPause
})

electron.powerMonitor.on('resume', function pauseOnWake () {
log.info('Waking from sleep')
electron.powerMonitor.on('suspend', function pauseOnWake () {
log.info('Entering sleep, pausing')
ipcMain.emit('pause')
})

Expand Down

0 comments on commit 5c49015

Please sign in to comment.