Waybar tray icon menu refresh issues

Đang mở
#5,993 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
38/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp, linux
Lĩnh vực
desktop, tooling

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

  1. Sunshine src/system_tray.cpp:863-883, update_tray_require_pin(), calls tray_update twice. Streaming state changes also call tray_update.
  2. LizardByte/tray src/QtTrayMenu.cpp:164-174 calls updateMenu() on every update, even for icon/tooltip/notification-only changes.
  3. 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.
  4. 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.
  5. 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.
  6. 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

Ngôn ngữ chính
C++
Star
43k
Fork
2.4k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của LizardByte/Sunshine

Tất cả issue của LizardByte/Sunshine

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.