status-area: Use ItemIsMenu correctly

The comment that was previously here assumed that `ItemIsMenu` should be
defined for any status item that has a menu, but the FreeDesktop spec
rather defines it as an item that "only supports the context menu", so
we should open the menu instead of trying to call `Activate`.

This change won't affect behavior if `ItemIsMenu` is true, but `Activate`
errors, except by opening the menu without having to wait for that
errror first. It will fix the left click to open menu behavior if any
client defines that method to not error, but does set `ItemIsMenu`.
This commit is contained in:
Ian Douglas Scott 2026-01-28 18:44:05 -08:00
parent c24b769acd
commit fe0e4bf409
2 changed files with 23 additions and 21 deletions

View file

@ -543,6 +543,9 @@ fn activate(
item: &StatusNotifierItem,
activation_token: Option<String>,
) -> Task<cosmic::Action<Msg>> {
if item.is_menu() {
return Task::done(cosmic::action::app(Msg::TogglePopup(id)));
}
let item_proxy = item.item_proxy().clone();
Task::future(async move {
if let Some(t) = activation_token {