This commit is contained in:
Vanessa 2023-02-26 11:45:50 +08:00
parent 69139f530d
commit 990b31dc00
4 changed files with 21 additions and 16 deletions

View file

@ -760,9 +760,9 @@ app.whenReady().then(() => {
},
});
win.loadURL(data.url);
const targetScreen = screen.getDisplayNearestPoint(screen.getCursorScreenPoint())
const targetScreen = screen.getDisplayNearestPoint(screen.getCursorScreenPoint());
if (mainScreen.id !== targetScreen.id) {
win.setBounds(targetScreen.workArea)
win.setBounds(targetScreen.workArea);
}
require("@electron/remote/main").enable(win.webContents);
});