Fix window bounds restore on OSx

This commit is contained in:
DC
2016-03-21 03:53:32 -07:00
parent 511c60671c
commit fe943db448
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 // Maximize or minimize, if the second argument is present
var willBeMaximized var willBeMaximized
if (maximize === true) { if (maximize === true) {
windows.main.maximize() if (!windows.main.isMaximized) windows.main.maximize()
willBeMaximized = true willBeMaximized = true
} else if (maximize === false) { } else if (maximize === false) {
windows.main.unmaximize() if (windows.main.isMaximized) windows.main.unmaximize()
willBeMaximized = false willBeMaximized = false
} else { } else {
willBeMaximized = windows.main.isMaximized() willBeMaximized = windows.main.isMaximized()

View File

@@ -229,9 +229,11 @@ function dispatch (action, ...args) {
jumpToTime(args[0] /* seconds */) jumpToTime(args[0] /* seconds */)
} }
if (action === 'videoPlaying') { if (action === 'videoPlaying') {
state.video.isPaused = false
ipcRenderer.send('blockPowerSave') ipcRenderer.send('blockPowerSave')
} }
if (action === 'videoPaused') { if (action === 'videoPaused') {
state.video.isPaused = true
ipcRenderer.send('paused-video') ipcRenderer.send('paused-video')
ipcRenderer.send('unblockPowerSave') ipcRenderer.send('unblockPowerSave')
} }