Only use setContentBounds for player view

Fixes: https://github.com/feross/webtorrent-desktop/issues/786
This commit is contained in:
Feross Aboukhadijeh
2016-08-19 20:05:52 -07:00
parent 2cc67dbda7
commit 51a9b2ea9b
2 changed files with 6 additions and 2 deletions

View File

@@ -143,7 +143,11 @@ function setBounds (bounds, maximize) {
}
// Resize the window's content area (so window border doesn't need to be taken
// into account)
main.win.setContentBounds(bounds, true)
if (bounds.contentBounds) {
main.win.setContentBounds(bounds, true)
} else {
main.win.setBounds(bounds, true)
}
} else {
log('setBounds: not setting bounds because of window maximization')
}

View File

@@ -362,7 +362,7 @@ function setDimensions (dimensions) {
)
ipcRenderer.send('setAspectRatio', aspectRatio)
ipcRenderer.send('setBounds', {x: null, y: null, width, height})
ipcRenderer.send('setBounds', {contentBounds: true, x: null, y: null, width, height})
state.playing.aspectRatio = aspectRatio
}