Skip to content

tray: keep the action prefix valid for well-known bus names - #578

Open
borisi1 wants to merge 1 commit into
WayfireWM:masterfrom
borisi1:fix/tray-wellknown-name
Open

borisi1 wants to merge 1 commit into
WayfireWM:masterfrom
borisi1:fix/tray-wellknown-name

Conversation

@borisi1

@borisi1 borisi1 commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Fixes #576.

dbus_name_as_prefix() only maps :, digits and .; every other character became '\0' via std::unordered_map::operator[]. Well-known names such as Electron's org.freedesktop.StatusNotifierItem-2916-1 therefore produced a prefix with NULs, the menu's actions were not found under it, and clicking an entry did nothing.

Keep mapped characters as before, pass ASCII letters through unchanged, and map anything else (e.g. -) to 'y', which isn't used by the existing mapping. Unique names (:1.42) give exactly the same prefix as before.

Tested: Claude Desktop's tray menu entries now work; tray items with unique names behave as before.

🤖 Generated with Claude Code

dbus_name_as_prefix() only maps ':', digits and '.'; every other character
became '\0' via std::unordered_map::operator[]. Well-known names such as
Electron's org.freedesktop.StatusNotifierItem-2916-1 therefore produced a
prefix with NULs, the menu's actions were not found under it, and clicking
a menu entry did nothing.

Keep mapped characters as before, pass ASCII letters through and map
anything else to 'y'. Unique names (:1.42) give the same prefix as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@borisi1

borisi1 commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

The failing "Check code style with uncrustify" job isn't about this change: it fails while building uncrustify ("Compatibility with CMake < 3.5 has been removed from CMake", "Configuring incomplete"), the same as on network-nullptr and util-version-arg since Oct 20. Building ammen99/uncrustify locally with -DCMAKE_POLICY_VERSION_MINIMUM=3.5 and running it with wayfire's uncrustify.ini on the changed file gives no diff.

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.

tray: menu entries do nothing for items registered under a well-known bus name (e.g. Electron apps)

1 participant