From 7fd9d5a971f032161c5d6f48fe19a98f2f017dc3 Mon Sep 17 00:00:00 2001 From: Araxeus <78568641+Araxeus@users.noreply.github.com> Date: Wed, 19 Jan 2022 19:40:58 +0200 Subject: [PATCH] use -8 insteaf of 0 (often maximized app will have -8,-8 coordinates) --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 1667fa3e..6a3f8578 100644 --- a/index.js +++ b/index.js @@ -127,8 +127,8 @@ function createMainWindow() { const { x, y } = windowPosition; const winSize = win.getSize(); const displaySize = electron.screen.getDisplayNearestPoint(windowPosition).bounds; - if((x + winSize[0] < 0 || x -winSize[0] > displaySize.width) || - (y < 0 || y > displaySize.height)) { + if((x + winSize[0] < -8 || x - winSize[0] > displaySize.width) || + (y < -8 || y > displaySize.height)) { //Window is offscreen if (is.dev()) { console.log(`Window tried to render offscreen, windowSize=${winSize}, displaySize=${displaySize}, position=${windowPosition}`);