feat(desktop): 实现关闭窗口后系统托盘后台运行,并支持代理实例持久化#35
Open
sysfox wants to merge 8 commits into
Open
Conversation
将托盘相关的窗口隐藏逻辑抽离为hide_to_tray函数,统一两处关闭窗口的处理流程,修复部分平台下hide()被误判为关闭导致程序退出的问题,同时优化窗口恢复显示的逻辑
调整弹窗窗口的显示逻辑,先设置窗口可见再取消最小化状态,确保弹窗可以正确弹出
新增实例配置保存与加载功能,支持程序退出后保存当前代理实例列表,重启时自动恢复之前的代理配置,包括监听地址、远程地址、标签和作用域主机信息。
frankli0324
approved these changes
Jul 12, 2026
Reverier-Xu
requested changes
Jul 12, 2026
Member
There was a problem hiding this comment.
hi, thanks for contributing!
the support for linux in tray-icon crate depends on x11 which use xdotool for system operations ( won't working well on wayland), so we'd better not import it as our tray solution.
slint has it's own tray implementation here https://docs.slint.dev/latest/docs/slint/reference/window/systemtrayicon/
Author
|
总结:原来遇到的一堆玄学bug是slint没有从 |
SystemTrayIcon 在 Slint 1.17 才正式稳定,1.15 中为实验性功能 且存在实现缺陷,导致托盘图标创建后不可见。升级至 1.17 并 启用 system-tray feature 即可解决。
Member
Author
|
@Reverier-Xu 我这里复现不了,你可以试试build以后安装下试试 QQ20260713-004337.mp4 |
Author
Member
|
挠头,似乎是 wayland 带来的问题,这个我明天晚上看看吧,稍后合入 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

实现功能
关闭窗口后系统托盘后台运行,并支持代理实例持久化
屏幕截图验证
应用后台运行后链接依然维持