From 719f0561b15208e6650197eb1c0eb81aa032e21f Mon Sep 17 00:00:00 2001 From: DC Date: Mon, 21 Mar 2016 03:53:32 -0700 Subject: [PATCH] Fix window bounds restore on OSx --- main/ipc.js | 4 ++-- renderer/index.js | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/main/ipc.js b/main/ipc.js index eb0951b8..19288727 100644 --- a/main/ipc.js +++ b/main/ipc.js @@ -66,10 +66,10 @@ function setBounds (bounds, maximize) { // Maximize or minimize, if the second argument is present var willBeMaximized if (maximize === true) { - windows.main.maximize() + if (!windows.main.isMaximized) windows.main.maximize() willBeMaximized = true } else if (maximize === false) { - windows.main.unmaximize() + if (windows.main.isMaximized) windows.main.unmaximize() willBeMaximized = false } else { willBeMaximized = windows.main.isMaximized() diff --git a/renderer/index.js b/renderer/index.js index 566912c3..f4d859e0 100644 --- a/renderer/index.js +++ b/renderer/index.js @@ -229,9 +229,11 @@ function dispatch (action, ...args) { jumpToTime(args[0] /* seconds */) } if (action === 'videoPlaying') { + state.video.isPaused = false ipcRenderer.send('blockPowerSave') } if (action === 'videoPaused') { + state.video.isPaused = true ipcRenderer.send('paused-video') ipcRenderer.send('unblockPowerSave') }