diff options
Diffstat (limited to 'registryd')
-rw-r--r-- | registryd/deviceeventcontroller.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/registryd/deviceeventcontroller.c b/registryd/deviceeventcontroller.c index cb299fc0..9d05981b 100644 --- a/registryd/deviceeventcontroller.c +++ b/registryd/deviceeventcontroller.c @@ -396,14 +396,16 @@ spi_dec_poll_mouse_moved (gpointer data) static gboolean spi_dec_poll_mouse_idle (gpointer data) { + SpiDEController *controller = SPI_DEVICE_EVENT_CONTROLLER(data); + if (!have_mouse_event_listener && !have_mouse_listener) return FALSE; - else if (!spi_dec_poll_mouse_moved (data)) + else if (!spi_dec_poll_mouse_moved (controller)) return TRUE; else { guint id; - id = g_timeout_add (20, spi_dec_poll_mouse_moving, data); + id = g_timeout_add (20, spi_dec_poll_mouse_moving, controller); g_source_set_name_by_id (id, "[at-spi2-core] spi_dec_poll_mouse_moving"); return FALSE; } @@ -412,14 +414,16 @@ spi_dec_poll_mouse_idle (gpointer data) static gboolean spi_dec_poll_mouse_moving (gpointer data) { + SpiDEController *controller = SPI_DEVICE_EVENT_CONTROLLER(data); + if (!have_mouse_event_listener && !have_mouse_listener) return FALSE; - else if (spi_dec_poll_mouse_moved (data)) + else if (spi_dec_poll_mouse_moved (controller)) return TRUE; else { guint id; - id = g_timeout_add (100, spi_dec_poll_mouse_idle, data); + id = g_timeout_add (100, spi_dec_poll_mouse_idle, controller); g_source_set_name_by_id (id, "[at-spi2-core] check_release"); return FALSE; } |