object-manager: look into the proxy object when checking constraints on a global

This allows having constraints on the pw properties and the GObject
properties of the proxy, instead of just on the global properties.

This is only useful for constraints on impl proxies, since the globals
coming from the registry don't have a proxy object associated at the
time they are added in the object managers
This commit is contained in:
George Kiagiadakis
2020-03-31 13:07:05 +03:00
parent 012b2c7383
commit 25d8e5e375

View File

@@ -447,7 +447,8 @@ wp_object_manager_is_interested_in_global (WpObjectManager * self,
pw_array_for_each (i, &self->interests) { pw_array_for_each (i, &self->interests) {
if (g_type_is_a (global->type, i->g_type) if (g_type_is_a (global->type, i->g_type)
&& (!i->constraints || && (!i->constraints ||
check_constraints (i->constraints, global->properties, NULL))) check_constraints (i->constraints, global->properties,
G_OBJECT (global->proxy))))
{ {
*wanted_features = i->wanted_features; *wanted_features = i->wanted_features;
return TRUE; return TRUE;