From b514f49b0892dafb0f9b2b488d635cf6270759e4 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 13 Dec 2018 11:58:49 +1000 Subject: [PATCH] tools: sync ratbagd from Piper Signed-off-by: Peter Hutterer --- tools/ratbagd.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/ratbagd.py b/tools/ratbagd.py index 2709d674..13ee5842 100644 --- a/tools/ratbagd.py +++ b/tools/ratbagd.py @@ -278,12 +278,18 @@ class Ratbagd(_RatbagdDBus): (GObject.SignalFlags.RUN_FIRST, None, (GObject.TYPE_PYOBJECT,)), "device-removed": (GObject.SignalFlags.RUN_FIRST, None, (GObject.TYPE_PYOBJECT,)), + "daemon-disappeared": + (GObject.SignalFlags.RUN_FIRST, None, ()), } def __init__(self): _RatbagdDBus.__init__(self, "Manager", None) result = self._get_dbus_property("Devices") or [] self._devices = [RatbagdDevice(objpath) for objpath in result] + self._proxy.connect("notify::g-name-owner", self._on_name_owner_changed) + + def _on_name_owner_changed(self, *kwargs): + self.emit("daemon-disappeared") def _on_properties_changed(self, proxy, changed_props, invalidated_props): if "Devices" in changed_props.keys():