From bb885c6d6dc7ebda741487b8ef15aced0c67acbf Mon Sep 17 00:00:00 2001 From: Jokul Date: Sat, 4 Jul 2026 20:36:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BD=BF=E7=94=A8=20BrowserWindow.setIc?= =?UTF-8?q?on=20=E6=9B=BF=E4=BB=A3=20app.setIcon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/index.ts b/src/main/index.ts index 7385336..f66193b 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -32,8 +32,8 @@ function createWindow(): void { }) // Linux taskbar icon - if (process.platform === 'linux') { - app.setIcon(iconPath) + if (process.platform === 'linux' && mainWindow) { + mainWindow.setIcon(nativeImage.createFromPath(iconPath)) } restoreAndTrack(mainWindow)