mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-10 10:11:46 +00:00
use -8 insteaf of 0
(often maximized app will have -8,-8 coordinates)
This commit is contained in:
4
index.js
4
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}`);
|
||||
|
||||
Reference in New Issue
Block a user