From 35d2a10a625a532b5022b4a57650ce6fe472185a Mon Sep 17 00:00:00 2001 From: pompurin404 Date: Mon, 28 Oct 2024 11:06:48 +0800 Subject: [PATCH] save window state --- src/main/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/index.ts b/src/main/index.ts index 5ced391..72f8e96 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -265,6 +265,10 @@ export async function createWindow(): Promise { } }) + mainWindow.on('resized', () => { + if (mainWindow) mainWindowState.saveState(mainWindow) + }) + mainWindow.on('session-end', async () => { triggerSysProxy(false) await stopCore()