From d64af72f74ba8fad7d7464743960bf73095540db Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 31 Aug 2017 13:57:00 +1000 Subject: [PATCH] ratbagd: fix profile IsActive property changes We sent a signal out but not the "property has changed" signal we actually needed. Fixes #295 Signed-off-by: Peter Hutterer --- ratbagd/ratbagd-profile.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/ratbagd/ratbagd-profile.c b/ratbagd/ratbagd-profile.c index da50510e..6889d692 100644 --- a/ratbagd/ratbagd-profile.c +++ b/ratbagd/ratbagd-profile.c @@ -268,17 +268,13 @@ static int ratbagd_profile_find_led(sd_bus *bus, static int ratbagd_profile_active_signal_cb(sd_bus *bus, struct ratbagd_profile *profile) { - struct ratbag_profile *lib_profile = profile->lib_profile; - /* FIXME: we should cache is active and only send the signal for * those profiles where it changed */ - - (void) sd_bus_emit_signal(bus, - profile->path, - RATBAGD_NAME_ROOT ".Profile", - "IsActive", - "b", - ratbag_profile_is_active(lib_profile)); + (void) sd_bus_emit_properties_changed(bus, + profile->path, + RATBAGD_NAME_ROOT ".Profile", + "IsActive", + NULL); return 0; }