Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix submenu id assign #7

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Fix submenu id assign #7

wants to merge 14 commits into from

Conversation

mpotra
Copy link
Contributor

@mpotra mpotra commented Jan 11, 2022

This PR fixes an ID assignment bug for new submenus, reported in #6

The bug was that when determining the last used menu item ID, the algorithm did not search deep into the tree children, and for cases where a child id was greater than the last parent ID, the algorithm would only return the parent ID.
This resulted in new child id assignments to overlap with existing ids and thus send overlapping ids to D-Bus that would show previously assigned menu items in place of new ones.

Includes unit test for the fix.

@mpotra mpotra added the bug Something isn't working label Jan 11, 2022
@mpotra
Copy link
Contributor Author

mpotra commented Jan 14, 2022

I've added telemetry-based debugging.
To enable, use the EXSNI_DEBUG environment variable, with comma-separated values as listed here: https://github.com/elixir-desktop/ex_sni/blob/fix_submenu_id_assign/lib/debugger.ex#L4-L13
Example:
EXSNI_DEBUG=all ./run to start ddrive with all telemetry events debugged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant