diff options
author | Federico Mena Quintero <federico@gnome.org> | 2022-11-11 10:23:33 -0600 |
---|---|---|
committer | Federico Mena Quintero <federico@gnome.org> | 2022-11-11 10:23:33 -0600 |
commit | ff2d81a97415b33a4c0014b208860687d350dae9 (patch) | |
tree | 883b2e9116ea47380dd4df5cfdcf655b1c64d012 /registryd | |
parent | 90ed7a1bca5b49ea549b1ce2cd21d96a1dc9305b (diff) | |
download | at-spi2-core-ff2d81a97415b33a4c0014b208860687d350dae9.tar.gz |
spi_device_event_controller_start_poll_mouse() - take an SpiDEController, not a registry
This function was just extracting the registry->dec, but it's cleaner
if it doesn't peek at the registry's internals. Instead, the registry
can call this function with the DEC it already knows about.
Diffstat (limited to 'registryd')
-rw-r--r-- | registryd/deviceeventcontroller.c | 4 | ||||
-rw-r--r-- | registryd/deviceeventcontroller.h | 2 | ||||
-rw-r--r-- | registryd/registry.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/registryd/deviceeventcontroller.c b/registryd/deviceeventcontroller.c index 0a75cb11..cb299fc0 100644 --- a/registryd/deviceeventcontroller.c +++ b/registryd/deviceeventcontroller.c @@ -2045,14 +2045,14 @@ spi_registry_dec_new (DBusConnection *bus) } void -spi_device_event_controller_start_poll_mouse (SpiRegistry *registry) +spi_device_event_controller_start_poll_mouse (SpiDEController *dec) { if (!have_mouse_event_listener) { have_mouse_event_listener = TRUE; if (!have_mouse_listener) { guint id; - id = g_timeout_add (100, spi_dec_poll_mouse_idle, registry->dec); + id = g_timeout_add (100, spi_dec_poll_mouse_idle, dec); g_source_set_name_by_id (id, "[at-spi2-core] spi_dec_poll_mouse_idle"); } } diff --git a/registryd/deviceeventcontroller.h b/registryd/deviceeventcontroller.h index 09f7cc2b..8c35b6df 100644 --- a/registryd/deviceeventcontroller.h +++ b/registryd/deviceeventcontroller.h @@ -141,7 +141,7 @@ GType spi_device_event_controller_get_type (void); SpiDEController *spi_device_event_controller_new (SpiRegistry *registry, DBusConnection *bus); -void spi_device_event_controller_start_poll_mouse (SpiRegistry *registry); +void spi_device_event_controller_start_poll_mouse (SpiDEController *dec); void spi_device_event_controller_stop_poll_mouse (void); void spi_remove_device_listeners (SpiDEController *controller, const char *bus_name); diff --git a/registryd/registry.c b/registryd/registry.c index 8e0cd35e..bc4d1821 100644 --- a/registryd/registry.c +++ b/registryd/registry.c @@ -936,7 +936,7 @@ impl_RegisterEvent (DBusMessage *message, SpiRegistry *registry) if (needs_mouse_poll (evdata->data)) { - spi_device_event_controller_start_poll_mouse (registry); + spi_device_event_controller_start_poll_mouse (registry->dec); } signal = dbus_message_new_signal (SPI_DBUS_PATH_REGISTRY, |