Fix window bounds restore on OSx

This commit is contained in:
DC
2016-03-21 03:53:32 -07:00
parent 3019fbef3e
commit 719f0561b1
2 changed files with 4 additions and 2 deletions

View File

@@ -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()

View File

@@ -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')
}