From 25d8e5e375fced3918cd5220b856c32800564df1 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Tue, 31 Mar 2020 13:07:05 +0300 Subject: [PATCH] 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 --- lib/wp/object-manager.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/wp/object-manager.c b/lib/wp/object-manager.c index 67c09bb3..b3d80dd0 100644 --- a/lib/wp/object-manager.c +++ b/lib/wp/object-manager.c @@ -447,7 +447,8 @@ wp_object_manager_is_interested_in_global (WpObjectManager * self, pw_array_for_each (i, &self->interests) { if (g_type_is_a (global->type, i->g_type) && (!i->constraints || - check_constraints (i->constraints, global->properties, NULL))) + check_constraints (i->constraints, global->properties, + G_OBJECT (global->proxy)))) { *wanted_features = i->wanted_features; return TRUE;