status-area: Fix handling of NameOwnerChanged with non-None new name (#1010)
Fixes issue where `fcitx5` app icon persists after it is no longer running. It seems it was getting a `NameOwnerChanged` event with the acquired name after `register_status_notifier_item()`.
This commit is contained in:
parent
d3ef5b181b
commit
1d3d869f4a
1 changed files with 13 additions and 11 deletions
|
|
@ -118,6 +118,7 @@ pub async fn create_service(connection: &zbus::Connection) -> zbus::Result<()> {
|
|||
have_bus_name = false;
|
||||
}
|
||||
} else if let BusName::Unique(name) = &args.name {
|
||||
if args.new_owner.is_none() {
|
||||
let mut interface = interface.get_mut().await;
|
||||
if let Some(idx) = interface
|
||||
.items
|
||||
|
|
@ -132,6 +133,7 @@ pub async fn create_service(connection: &zbus::Connection) -> zbus::Result<()> {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Ok(())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue