diff options
author | Colomban Wendling <cwendling@hypra.fr> | 2019-12-03 17:09:55 +0100 |
---|---|---|
committer | Colomban Wendling <cwendling@hypra.fr> | 2019-12-03 17:30:59 +0100 |
commit | 8cdf4d30c74e475146a47f0bb1c9992f4a3ac372 (patch) | |
tree | acb45a4da4c45679ff8f36f5a218b35e249cf2f9 /atk-adaptor/event.h | |
parent | 057bcaea717b72c47967804ee079007b27b556d8 (diff) | |
download | at-spi2-atk-8cdf4d30c74e475146a47f0bb1c9992f4a3ac372.tar.gz |
adaptor: Fix missing events at startup
We need to register the application before anything else happens,
otherwise we might miss some events sent before registration.
As we want to register only from the main loop to avoid registering
an application that won't respond to calls [1], we used an idle
callback; but it doesn't run early enough in all cases, e.g. in
Firefox. So, switch to a high-priority 0-timeout so that it should be
dispatched among the first ones in the next main loop iteration, then
being run before other callbacks that might generate events.
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2186
[1] https://gitlab.gnome.org/GNOME/at-spi2-core/issues/16
Diffstat (limited to 'atk-adaptor/event.h')
-rw-r--r-- | atk-adaptor/event.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/atk-adaptor/event.h b/atk-adaptor/event.h index 8b3b30f..fe4aad0 100644 --- a/atk-adaptor/event.h +++ b/atk-adaptor/event.h @@ -34,4 +34,6 @@ gboolean spi_event_is_subtype (gchar **needle, gchar **haystack); extern GMainContext *spi_context; guint spi_idle_add(GSourceFunc function, gpointer data); guint spi_timeout_add_seconds (gint interval, GSourceFunc function, gpointer data); +guint spi_timeout_add_full (gint priority, guint interval, GSourceFunc function, + gpointer data, GDestroyNotify notify); #endif /* EVENT_H */ |