Skip to content

fix(tray): hide passive status notifier items - #3795

Open
LuciusChen wants to merge 1 commit into
noctalia-dev:mainfrom
LuciusChen:fix/tray-hide-passive
Open

fix(tray): hide passive status notifier items#3795
LuciusChen wants to merge 1 commit into
noctalia-dev:mainfrom
LuciusChen:fix/tray-hide-passive

Conversation

@LuciusChen

Copy link
Copy Markdown
Contributor

Summary

  • omit StatusNotifierItems whose status is Passive from inline tray rendering
  • keep tray drawer visibility and trigger counts consistent with the rendered items
  • add focused coverage for Passive, Active, NeedsAttention, empty, and case-normalized statuses

Motivation

Clients such as udiskie implement smart tray behavior by changing their StatusNotifierItem from Active to Passive when no removable devices are available. Noctalia tracked that change but continued rendering the item, leaving a stale-looking removable-drive icon after unplugging the device.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Build / packaging

Related Issue

Closes #3794

Testing

  • meson test -C build-debug tray_identifier --print-errorlogs
  • meson test -C build-debug tray_identifier fcitx_status icon_resolver --print-errorlogs
  • git diff --check
  • formatted changed C++ files with clang-format 22.1.8 (just is not installed in the test environment)

Manual Coverage

  • Tested on Niri
  • Tested on Hyprland
  • Tested on Sway
  • Tested on another compositor
  • Tested with different bar positions and density settings
  • Tested at different interface scaling values
  • Tested with multiple monitors

The original behavior was reproduced on Labwc with udiskie 2.7.0. The patched build was covered by focused unit tests but was not installed over the running packaged Noctalia session.

Screenshots / Videos

Not included; this changes whether an idle tray item is present rather than its visual styling.

Checklist

  • This PR is ready for review.
  • I read and followed the relevant guidance in CONTRIBUTING.md.
  • I ran just format with clang-format v22+ installed, or this PR has no code changes.
  • I ran the relevant build and test commands.
  • I self-reviewed the changes.
  • I checked for new warnings or errors.
  • This PR does not change user-facing configuration or require documentation updates.
  • This PR adds no new user-facing strings.
  • I did not edit non-English translation files.
  • I used the existing canonical names for config keys, IPC names, paths, and identifiers.

Additional Notes

Unknown or empty status values remain visible for compatibility with incomplete third-party StatusNotifierItem implementations. Status matching is case-insensitive, consistent with the surrounding tray identifier normalization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Passive StatusNotifierItems remain visible in the tray

1 participant