From 51a9b2ea9beaba7cc27c444a8223133551307377 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Fri, 19 Aug 2016 20:05:52 -0700 Subject: [PATCH] Only use setContentBounds for player view Fixes: https://github.com/feross/webtorrent-desktop/issues/786 --- src/main/windows/main.js | 6 +++++- src/renderer/main.js | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/windows/main.js b/src/main/windows/main.js index d60959b6..37e95792 100644 --- a/src/main/windows/main.js +++ b/src/main/windows/main.js @@ -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') } diff --git a/src/renderer/main.js b/src/renderer/main.js index 15fd2183..bd12d9ed 100644 --- a/src/renderer/main.js +++ b/src/renderer/main.js @@ -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 }