iovxw / ksni

A Rust implementation of the KDE/freedesktop StatusNotifierItem specification
The Unlicense
73 stars 11 forks source link

updating an item's callback doesn't seem to invalidate the menu #15

Closed lunixbochs closed 1 year ago

lunixbochs commented 1 year ago

If I do two menu updates in a row, where the second menu update is identical to the first in every way, but changes the activate callbacks for some submenu items, the second update seems to be completely ignored.

This means the old callbacks are called, and in my case those menu items end up having no effect until the menu is invalidated some other way.

I think the answer here is to always consume the passed-in click callbacks, even if the menu layout doesn't update.