From 8105f5f4c3aec44627b04836f6293deb1634ca04 Mon Sep 17 00:00:00 2001 From: Bruno Lemos Date: Fri, 28 Dec 2018 03:00:35 -0200 Subject: [PATCH] [Desktop][Windows] Fix window max dimensions --- packages/desktop/src/index.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/desktop/src/index.ts b/packages/desktop/src/index.ts index 7b774d5b..83f73c4f 100644 --- a/packages/desktop/src/index.ts +++ b/packages/desktop/src/index.ts @@ -534,11 +534,17 @@ function updateBrowserWindowOptions() { ) mainWindow.setMaximumSize( - Math.floor( - options.maxWidth || screen.getPrimaryDisplay().workAreaSize.width, + Math.ceil( + options.maxWidth || + (process.platform === 'darwin' + ? screen.getPrimaryDisplay().workAreaSize.width + : 0), ), - Math.floor( - options.maxHeight || screen.getPrimaryDisplay().workAreaSize.height, + Math.ceil( + options.maxHeight || + (process.platform === 'darwin' + ? screen.getPrimaryDisplay().workAreaSize.height + : 0), ), )