From 0e129ab00fcff96f0b8bb97286ffd42798d4766a Mon Sep 17 00:00:00 2001 From: pompurin404 Date: Sun, 6 Oct 2024 18:29:49 +0800 Subject: [PATCH] keep always on top --- changelog.md | 2 +- src/main/resolve/floatingWindow.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index edf244b..e007480 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,4 @@ ### Bug Fixes - 修复开启轻量模式后 TrafficMonitor 重复启动的问题 -- 修复 TrafficMonitor 重复开关后位置偏移的问题 +- 修复 悬浮窗置顶失效的问题 diff --git a/src/main/resolve/floatingWindow.ts b/src/main/resolve/floatingWindow.ts index ed1513f..967f62f 100644 --- a/src/main/resolve/floatingWindow.ts +++ b/src/main/resolve/floatingWindow.ts @@ -37,6 +37,7 @@ async function createFloatingWindow(): Promise { floatingWindow.on('ready-to-show', () => { applyTheme(customTheme) floatingWindow?.show() + floatingWindow?.setAlwaysOnTop(true, 'screen-saver') }) floatingWindow.on('moved', () => { if (floatingWindow) floatingWindowState.saveState(floatingWindow)