Waybar tray icon menu refresh issues
还没有人认领这个 Issue。
评估
调研方向
Read src/system_tray.cpp:863-883 and trace how tray_update reaches the bundled LizardByte/tray implementation in src/QtTrayMenu.cpp:164-174 and 224-235. Reproduce a menu refresh during pairing and inspect whether existing menu IDs remain valid or clients receive a refresh signal. Done means menu actions still work after the pairing notification without reloading Waybar.
由索引模型根据 Issue 内容生成。
描述
Is there an existing issue for this?
- I have searched the existing issues
Is your issue described in the documentation?
- I have read the documentation
Is your issue present in the latest beta/pre-release?
This issue is present in the latest pre-release
Describe the Bug
Sunshine tray stops responding after pairing
Installed versions:
Sunshine 2026.914.233613-1 (63d35f702ee9e362e43263742981836ec0710384),
bundled LizardByte/tray c329d9fd0d39dfb47f0f2fb5467e1db2e8a1d623,
Waybar 0.15.0-3, Qt 6.12.0-3.
Confirmed runtime evidence
- Sunshine started
- Moonlight started and sent pairing request
- Sunshine process remained alive and its Web UI responded.
- Sunshine tray icon menu clicks don't respond anymore
- Before the new pairing request, GetLayout returned Open Sunshine=28, Restart=37, Quit=39.
- After the new pairing request, GetLayout returned Open Sunshine=54, Restart=63, Quit=65.
- Waybar (:1.11) continued to send EventGroup(clicked) for the obsolete Open Sunshine ID 28 to Sunshine (:1.116).
- There was no LayoutUpdated signal in the recorded menu traffic during this transition.
- Earlier, a direct Quit call using Sunshine's current menu ID executed immediately, and reloading Waybar restored mouse-driven menu actions without restarting Sunshine.
Expected Behavior
Tray icon menu just works
Additional Context
Source chain
- Sunshine src/system_tray.cpp:863-883, update_tray_require_pin(), calls tray_update twice. Streaming state changes also call tray_update.
- LizardByte/tray src/QtTrayMenu.cpp:164-174 calls updateMenu() on every update, even for icon/tooltip/notification-only changes.
- QtTrayMenu.cpp:224-235 creates a fresh QMenu, calls setContextMenu(), fills it with fresh QActions, and destroys the previous QMenu. This invalidates the previous D-Bus menu IDs.
- Qt 6.12.0 qdbustrayicon.cpp:272-290 replaces the menu adaptor at the same D-Bus menu path. New root menus start with a fresh revision; qdbusmenutypes.cpp:68-76 additionally hardcodes revision 1 for root GetLayout. These details make full menu replacement incompatible with a client retaining the previous menu tree unless it is explicitly refreshed.
- Waybar 0.15.0 item.cpp:451-460 creates its dbusmenu client only when gtk_menu is null and retains it thereafter. Its signal mapping (287-296) does not process NewMenu. The cached menu remains usable visually but refers to obsolete actions.
- Qt qdbusmenuadaptor.cpp:82-89 looks up the ID and invokes an action only if the ID exists. Unknown IDs are silently ignored, explaining missing Sunshine log messages.
Corrective direction
Preserve the QMenu and existing QActions across icon, tooltip, and notification updates. Synchronize menu properties in place and modify the structure only when it changes, retaining the root menu export. Do not recreate the entire context menu for a pairing notification. Alternatively, the tray host must explicitly invalidate/refetch the menu on replacement, including revision reset handling.
Host Operating System
Linux
Operating System Version
Arch Linux (rolling release), kernel 7.2.11-arch1-1
Architecture
amd64/x86_64
Package
Linux - LizardByte/pacman-repo
GPU Type
Intel
GPU Model
Intel UHD Graphics 620 (WhiskeyLake-U GT2)
GPU Driver/Mesa Version
intel-media-driver 26.3.5-1 (VA-API/iHD), Mesa 26.2.5-1, kernel driver i915
Capture Method
No response
Apps
Log output
[2026-10-25 14:49:51.846]: Info: Sunshine version: 2026.914.233613 commit: 63d35f702ee9e362e43263742981836ec0710384
[2026-10-25 14:49:51.846]: Info: Package Publisher: LizardByte
[2026-10-25 14:49:51.846]: Info: Publisher Website: https://app.lizardbyte.dev
[2026-10-25 14:49:51.846]: Info: Get support: https://app.lizardbyte.dev/support
[2026-10-25 14:49:51.846]: Info: config: 'capture' = wlr
[2026-10-25 14:49:51.846]: Info: config: 'encoder' = vaapi
[2026-10-25 14:49:51.846]: Info: config: 'output_name' = TV
[2026-10-25 14:49:51.846]: Info: config: 'vaapi_quality' = speed
Online logs
No response
- 主要语言
- C++
- 星标
- 43k
- 派生
- 2.4k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
LizardByte/Sunshine 的其他 Issue
-
Linux keyboard backend has no mapping for VK_ABNT_C1 (ABNT2 dedicated `/ ?` key) — key is silently dropped可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
LizardByte/Sunshine#6051 · 2 条评论 ·
-
PIN pairing fails with "Missing CSRF token" - web UI never fetches/attaches the token可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
LizardByte/Sunshine#5467 · 2 条评论 ·
-
Virtual HID Driver License notifications appearing even though Enable Gamepad Input is unchecked未关闭
难度 3/5 1-2 天 新手友好度 65/100
LizardByte/Sunshine#6222 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 47/100
LizardByte/Sunshine#6208 ·
-
难度 4/5 3-5 天 新手友好度 45/100
LizardByte/Sunshine#6202 · 1 条评论 ·
查看 LizardByte/Sunshine 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 90/100
维护者通常 2 天内回复
-
bug data-types
难度 2/5 1-3 小时 新手友好度 76/100
ClickHouse/clickhouse-cpp#645 ·
维护者通常 1 天内回复
-
bug compatibility difficulty:easy prio:normal
难度 2/5 1-3 小时 新手友好度 74/100
NatronGitHub/openfx-misc#524 ·
维护者通常 1 天内回复
-
documentation enhancement help wanted P0
难度 2/5 1-3 小时 新手友好度 68/100
Awesome-Embedded-Learning-Studio/Tutorial_AwesomeModernCPP#359 ·
维护者通常 1 天内回复
-
Type: Bug
难度 2/5 1-3 小时 新手友好度 82/100
openscad/openscad#7360 · 2 条评论 ·
维护者通常 1 天内回复