single
This commit is contained in:
4
main.js
4
main.js
@@ -479,9 +479,6 @@ function createMenu() {
|
|||||||
mainWindow.setMenu(menu);
|
mainWindow.setMenu(menu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function createMainWindow = () => {
|
|
||||||
|
|
||||||
// 实现单例,在启动第二个实例后,激活主窗口,然后退出第二个实例
|
// 实现单例,在启动第二个实例后,激活主窗口,然后退出第二个实例
|
||||||
const shouldQuit = app.makeSingleInstance(() => {
|
const shouldQuit = app.makeSingleInstance(() => {
|
||||||
if (mainWindow) {
|
if (mainWindow) {
|
||||||
@@ -492,6 +489,7 @@ const shouldQuit = app.makeSingleInstance(() => {
|
|||||||
|
|
||||||
shouldQuit && app.quit()
|
shouldQuit && app.quit()
|
||||||
|
|
||||||
|
const createMainWindow = () => {
|
||||||
var mainWindowState = windowStateKeeper({
|
var mainWindowState = windowStateKeeper({
|
||||||
defaultWidth: 1300,
|
defaultWidth: 1300,
|
||||||
defaultHeight: 700,
|
defaultHeight: 700,
|
||||||
|
|||||||
Reference in New Issue
Block a user