[at-spi2-core] Send device event controller events using the same signature as other events



commit 12a7706eebee7aa79ac1cf383a51f09d0d4a5ff8
Author: Mike Gorse <mgorse suse com>
Date:   Fri Aug 26 10:29:17 2022 -0500

    Send device event controller events using the same signature as other events
    
    Helps #74

 registryd/deviceeventcontroller.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/registryd/deviceeventcontroller.c b/registryd/deviceeventcontroller.c
index 740995f4..8c9c8f8a 100644
--- a/registryd/deviceeventcontroller.c
+++ b/registryd/deviceeventcontroller.c
@@ -354,10 +354,9 @@ spi_dec_dbus_emit (SpiDEController *controller, const char *interface,
                    const char *name, const char *minor, int a1, int a2)
 {
   DBusMessage *signal = NULL;
-  DBusMessageIter iter, iter_struct, iter_variant;
+  DBusMessageIter iter, iter_dict, iter_variant;
   int nil = 0;
   const char *path = SPI_DBUS_PATH_ROOT;
-  const char *bus_name = dbus_bus_get_unique_name (controller->bus);
 
   signal = dbus_message_new_signal (path, interface, name);
 
@@ -370,11 +369,8 @@ spi_dec_dbus_emit (SpiDEController *controller, const char *interface,
       dbus_message_iter_append_basic (&iter_variant, DBUS_TYPE_INT32, &nil);
   dbus_message_iter_close_container (&iter, &iter_variant);
 
-  dbus_message_iter_open_container (&iter, DBUS_TYPE_STRUCT, NULL,
-                                    &iter_struct);
-  dbus_message_iter_append_basic (&iter_struct, DBUS_TYPE_STRING, &bus_name);
-  dbus_message_iter_append_basic (&iter_struct, DBUS_TYPE_OBJECT_PATH, &path);
-  dbus_message_iter_close_container (&iter, &iter_struct);
+  dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "{sv}", &iter_dict);
+    dbus_message_iter_close_container (&iter, &iter_dict);
 
   dbus_connection_send (controller->bus, signal, NULL);
   dbus_message_unref (signal);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]