From 9b53119121b49251ff2f164d28132a3d8e2c04b4 Mon Sep 17 00:00:00 2001 From: Jente Hidskes Date: Wed, 16 Aug 2017 23:28:52 +0200 Subject: [PATCH] RatbagdResolution: emit properties changed from resolution_set_active This allows clients to respond to changes in the active resolution. It's not the cleanest approach, but it works. To clean it up, we could cache the changed resolutions and make sure to only emit the signal on those, just as the FIXME already notes. References https://github.com/libratbag/piper/pull/132. --- ratbagd/ratbagd-resolution.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ratbagd/ratbagd-resolution.c b/ratbagd/ratbagd-resolution.c index b2de8e07..727c7c36 100644 --- a/ratbagd/ratbagd-resolution.c +++ b/ratbagd/ratbagd-resolution.c @@ -94,6 +94,12 @@ static int ratbagd_resolution_active_signal_cb(sd_bus *bus, "b", ratbag_resolution_is_active(lib_resolution)); + (void) sd_bus_emit_properties_changed(bus, + resolution->path, + RATBAGD_NAME_ROOT ".Resolution", + "IsActive", + NULL); + return 0; }