Skip to content

Commit

Permalink
fix: 修复Linux下插件调用窗口不置顶的问题 (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pylogmon committed May 18, 2023
1 parent 1a3d49e commit ea6e4b6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/windows/Translator/components/TopBar/index.jsx
Expand Up @@ -32,11 +32,10 @@ export default function TopBar() {
});
if (appWindow.label == 'persistent') {
appWindow.setAlwaysOnTop(pined);
}
// 使划词翻译窗口置顶,但是pined图标显示为false
// 这样一来pin在划词翻译窗口的作用相当于控制是否在失去焦点的时候关闭
// 而且对于划词翻译窗口确实需要使其一直处于置顶状态
if (appWindow.label == 'translator') {
} else {
// 使划词翻译窗口置顶,但是pined图标显示为false
// 这样一来pin在划词翻译窗口的作用相当于控制是否在失去焦点的时候关闭
// 而且对于划词翻译窗口确实需要使其一直处于置顶状态
appWindow.setAlwaysOnTop(true);
setPined(false);
}
Expand Down

0 comments on commit ea6e4b6

Please sign in to comment.