From 473eaa040f69b59ba0d10d189fccd09e5e3d3d2c Mon Sep 17 00:00:00 2001 From: kuaifan Date: Tue, 6 Sep 2022 16:03:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20window=E5=AE=A2=E6=88=B7=E7=AB=AF?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=A0=8F=E9=97=AA=E7=83=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron/electron.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/electron/electron.js b/electron/electron.js index 06651f934..7cfaa784f 100644 --- a/electron/electron.js +++ b/electron/electron.js @@ -391,10 +391,18 @@ ipcMain.on('sendForwardMain', (event, args) => { }) /** - * 设置Dock标记 + * 设置Dock标记(window闪烁、macos标记) * @param args */ ipcMain.on('setDockBadge', (event, args) => { + if (process.platform === 'win32') { + // Window flash + if (!mainWindow.isFocused()) { + mainWindow.once('focus', () => mainWindow.flashFrame(false)) + mainWindow.flashFrame(true) + } + return; + } if (process.platform !== 'darwin') { // Mac only return;