From 57db286405ce8d5628f5fbf96d7aab2ef5a9d151 Mon Sep 17 00:00:00 2001 From: Wei Yijun <44540759+2o181o28@users.noreply.github.com> Date: Wed, 22 Sep 2021 10:33:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DGNOME=E7=AD=89=E6=A1=8C?= =?UTF-8?q?=E9=9D=A2=E4=B8=8B=E6=AF=8F=E6=AC=A1=E6=89=93=E5=BC=80=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E6=97=B6=E9=9C=80=E9=87=8D=E6=96=B0=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=AD=8C=E8=AF=8D=E7=AA=97=E5=8F=A3=E7=BD=AE=E9=A1=B6=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20(#636)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- publish/changeLog.md | 1 + src/main/modules/winLyric/index.js | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/publish/changeLog.md b/publish/changeLog.md index 2306f326..3c98e5b4 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -8,3 +8,4 @@ - 修复点击播放详情页的进度条跳进度时会出现偏移的问题 - 修复在有提示信息的地方长按鼠标按键时提示信息会闪烁的问题 - 修复下载歌曲时的歌词下载不尝试获取缓存歌词的问题 +- 修复GNOME等桌面下每次打开应用时需重新设置歌词窗口置顶的问题 diff --git a/src/main/modules/winLyric/index.js b/src/main/modules/winLyric/index.js index 61365d53..9b0471dd 100644 --- a/src/main/modules/winLyric/index.js +++ b/src/main/modules/winLyric/index.js @@ -1,7 +1,7 @@ const path = require('path') const { BrowserWindow } = require('electron') const { winLyric: WIN_LYRIC_EVENT_NAME } = require('../../events/_name') -const { debounce } = require('../../../common/utils') +const { debounce, isLinux } = require('../../../common/utils') const { getLyricWindowBounds } = require('./utils') require('./event') @@ -66,6 +66,10 @@ const winEvent = lyricWindow => { if (global.appSetting.desktopLyric.isLock) { global.modules.lyricWindow.setIgnoreMouseEvents(true, { forward: false }) } + // linux下每次重开时貌似要重新设置置顶 + if (isLinux && global.appSetting.desktopLyric.isAlwaysOnTop) { + global.modules.lyricWindow.setAlwaysOnTop(global.appSetting.desktopLyric.isAlwaysOnTop, 'screen-saver') + } }) }