From 5c49015ad40ccd89bf762106ed594cf5f402adfa Mon Sep 17 00:00:00 2001 From: Bret Comnes Date: Thu, 2 Aug 2018 15:52:52 -0700 Subject: [PATCH] Pause on sleep rather than wake --- main/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/index.js b/main/index.js index 37c3efd..d7b619e 100644 --- a/main/index.js +++ b/main/index.js @@ -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') })