module_mpris: Fixed bus name handeling

The 'HandleNameChanged' event will no longer attempt to change the
name of non MPRIS clients.
This commit is contained in:
haruInDisguise 2025-03-26 20:45:29 +01:00
parent b7a7bc7db2
commit 33df540200

View file

@ -538,6 +538,9 @@ context_event_handle_name_owner_changed(sd_bus_message *message, struct context
assert(!is_empty_string(old_owner)); assert(!is_empty_string(old_owner));
struct client *client = client_lookup_by_unique_name(context, old_owner); struct client *client = client_lookup_by_unique_name(context, old_owner);
if (client == NULL)
return;
LOG_DBG("'NameOwnerChanged': Name changed from '%s' to '%s' for client '%s'", old_owner, new_owner, LOG_DBG("'NameOwnerChanged': Name changed from '%s' to '%s' for client '%s'", old_owner, new_owner,
client->bus_name); client->bus_name);
client_change_unique_name(client, new_owner); client_change_unique_name(client, new_owner);