Skip to content

[BUG] Passive StatusNotifierItems remain visible in the tray #3794

Description

@LuciusChen

Submission checklist

  • I searched existing issues and did not find a duplicate.
  • I confirmed the behavior is still present in the latest main source before preparing the linked fix.

Bug description

Noctalia continues to render StatusNotifierItems whose Status property has changed to Passive. This prevents clients such as udiskie from implementing a smart/auto-hiding tray icon: removing the last removable device changes the item from Active to Passive, but its icon remains visible in the bar.

The StatusNotifierItem specification describes Passive as an idle state that visualizations are likely to hide:

https://specifications.freedesktop.org/status-notifier-item/latest/status-notifier-item.html#status-notifier-item-properties-status

Steps to reproduce

  1. Start udiskie with udiskie --smart-tray under a Wayland session using Noctalia's tray widget.
  2. Insert a removable drive and confirm the tray icon appears.
  3. Remove the drive.
  4. Query the udiskie StatusNotifierItem Status property; it is now Passive.
  5. Observe that the icon remains visible in Noctalia's bar.

Expected behavior

Passive StatusNotifierItems are omitted from the tray and tray drawer. The udiskie icon should disappear after the last removable device is removed.

Actual behavior

Noctalia records the status change but renders the item regardless of its status, so the icon remains visible.

Relevant output

$ lsblk -o NAME,TYPE,RM,HOTPLUG,LABEL,MOUNTPOINTS
NAME        TYPE RM HOTPLUG LABEL MOUNTPOINTS
zram0       disk  0       0 zram0 [SWAP]
nvme0n1     disk  0       0
├─nvme0n1p1 part  0       0       /boot
└─nvme0n1p2 part  0       0       /

$ busctl --user get-property :1.928 /org/ayatana/NotificationItem/udiskie org.kde.StatusNotifierItem Status
s "Passive"

Noctalia version

Observed on v5.0.0-beta.7-64-g50f0f095053a; also confirmed by inspection against current main at e41c99439.

Environment

Compositor: Labwc
Distribution: Arch Linux
Installation method: AUR (noctalia-git)
StatusNotifierItem client: udiskie 2.7.0 (Ayatana AppIndicator backend)

Additional context

The tray widget already invalidates its icon cache when TrayItemInfo::status changes, but the rebuild paths do not filter items whose status is Passive. The tray drawer's visible item count similarly includes them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions