Fix: Restore minimized window on second instance

This commit is contained in:
LmeSzinc 2023-09-11 02:58:31 +08:00
parent fb6b11d154
commit bf0d7cd300

View File

@ -19,6 +19,10 @@ if (!isSingleInstance) {
logger.info('------createApp------'); logger.info('------createApp------');
await createApp(); await createApp();
} else { } else {
logger.info('------curWindow.restore------');
if (curWindow.isMinimized?.()) curWindow.restore?.();
logger.info('------curWindow.show------');
if (!curWindow.isVisible?.()) curWindow.show?.();
logger.info('------curWindow.focus------'); logger.info('------curWindow.focus------');
curWindow.focus?.(); curWindow.focus?.();
} }