From 148f4f217ea2af8ee9f9a4633ff535a2c17c82ac Mon Sep 17 00:00:00 2001 From: pompurin404 Date: Fri, 15 Nov 2024 20:11:29 +0800 Subject: [PATCH] keep window position --- src/main/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/index.ts b/src/main/index.ts index 6b43839..fd95fb5 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -269,6 +269,10 @@ export async function createWindow(): Promise { if (mainWindow) mainWindowState.saveState(mainWindow) }) + mainWindow.on('move', () => { + if (mainWindow) mainWindowState.saveState(mainWindow) + }) + mainWindow.on('session-end', async () => { triggerSysProxy(false) await stopCore()