-
Notifications
You must be signed in to change notification settings - Fork 61
Description
When I try to programmatically deselect a checkbox menu item (call Uncheck), it doesn't work if the menu item is part of a submenu.
I wrote a minimal example reproducing the issue. Basically, I wanted to emulate radio button group behavior which means only one item can be selected at a time and I need to deselect the previous selection without any associated input event.
While it works correctly in the root menu, it breaks when I use the same logic for submenu items.
The clicked item gets selected but the state of the others in the group doesn't change.
Here's the demonstration (tested in KDE):
https://github.com/nohajc/systray-issue-minimal-example
Thanks for any help.
BTW, I also wanted to submit a PR adding support for actual radio buttons (which are part of the dbusmenu interface) but I got stuck because of this issue. D-Bus basically only lets you select the type of the "tick" icon. It doesn't enforce any particular behavior so multiselect is still possible unless you add your own logic. Now, I believe my logic is correct but I was very surprised to see it doesn't work consistently.