#5993

Waybar tray icon menu refresh issues

Openceejeyopened 5d ago

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

undefined

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

Activity

0

No activity yet.