diff -Nru at-spi2-atk-2.34.1/atk-adaptor/bridge.c at-spi2-atk-2.34.2/atk-adaptor/bridge.c --- at-spi2-atk-2.34.1/atk-adaptor/bridge.c 2019-10-07 18:25:50.000000000 +0000 +++ at-spi2-atk-2.34.2/atk-adaptor/bridge.c 2020-02-29 22:37:19.000000000 +0000 @@ -403,8 +403,8 @@ get_registered_event_listeners (spi_global_app_data); } -gboolean -_atk_bridge_register_application (gpointer data) +static gboolean +register_application (gpointer data) { SpiBridge * app = data; DBusMessage *message; @@ -439,6 +439,31 @@ return FALSE; } +void +_atk_bridge_schedule_application_registration (SpiBridge *app) +{ + /* We need the callback to be called first thing, before any other of ours + * (and possibly of client apps), so use a high priority and a short timeout + * to try and be called first by the main loop. */ + if (!app->registration_pending) + app->registration_pending = spi_timeout_add_full (G_PRIORITY_HIGH, 0, + register_application, + app, NULL); +} + +gboolean +_atk_bridge_remove_pending_application_registration (SpiBridge *app) +{ + if (app->registration_pending) + { + g_source_remove (app->registration_pending); + app->registration_pending = 0; + return TRUE; + } + + return FALSE; +} + /*---------------------------------------------------------------------------*/ static void @@ -470,12 +495,8 @@ DBusMessageIter iter; const char *uname; - if (spi_global_app_data->registration_pending) - { - g_source_remove (spi_global_app_data->registration_pending); - spi_global_app_data->registration_pending = 0; + if (_atk_bridge_remove_pending_application_registration (spi_global_app_data)) return; - } message = dbus_message_new_method_call (SPI_DBUS_NAME_REGISTRY, ATSPI_DBUS_PATH_REGISTRY, @@ -850,7 +871,7 @@ { if (registry_lost && !old[0]) { - _atk_bridge_register_application (spi_global_app_data); + register_application (spi_global_app_data); registry_lost = FALSE; } else if (!new[0]) @@ -1105,9 +1126,8 @@ NULL); /* Register this app by sending a signal out to AT-SPI registry daemon */ - if (!atspi_no_register && (!root || !ATK_IS_PLUG (root)) && - !spi_global_app_data->registration_pending) - spi_global_app_data->registration_pending = spi_idle_add (_atk_bridge_register_application, spi_global_app_data); + if (!atspi_no_register && (!root || !ATK_IS_PLUG (root))) + _atk_bridge_schedule_application_registration (spi_global_app_data); else get_registered_event_listeners (spi_global_app_data); diff -Nru at-spi2-atk-2.34.1/atk-adaptor/bridge.h at-spi2-atk-2.34.2/atk-adaptor/bridge.h --- at-spi2-atk-2.34.1/atk-adaptor/bridge.h 2019-10-07 18:25:50.000000000 +0000 +++ at-spi2-atk-2.34.2/atk-adaptor/bridge.h 2020-02-29 22:37:19.000000000 +0000 @@ -94,7 +94,8 @@ GType _atk_bridge_type_from_iface (const char *iface); -gboolean _atk_bridge_register_application (gpointer data); +void _atk_bridge_schedule_application_registration (SpiBridge *app); +gboolean _atk_bridge_remove_pending_application_registration (SpiBridge *app); G_END_DECLS #endif /* BRIDGE_H */ diff -Nru at-spi2-atk-2.34.1/atk-adaptor/event.c at-spi2-atk-2.34.2/atk-adaptor/event.c --- at-spi2-atk-2.34.1/atk-adaptor/event.c 2019-10-07 18:25:50.000000000 +0000 +++ at-spi2-atk-2.34.2/atk-adaptor/event.c 2020-02-29 22:37:19.000000000 +0000 @@ -73,11 +73,8 @@ for (list = spi_global_app_data->direct_connections; list; list = list->next) atspi_dbus_connection_setup_with_g_main (list->data, cnx); - if (spi_global_app_data->registration_pending) - { - g_source_remove (spi_global_app_data->registration_pending); - spi_global_app_data->registration_pending = spi_idle_add (_atk_bridge_register_application, spi_global_app_data); - } + if (_atk_bridge_remove_pending_application_registration (spi_global_app_data)) + _atk_bridge_schedule_application_registration (spi_global_app_data); } guint @@ -105,6 +102,22 @@ id = g_source_attach (source, spi_context); g_source_unref (source); + return id; +} + +guint +spi_timeout_add_full (gint priority, guint interval, GSourceFunc function, + gpointer data, GDestroyNotify notify) +{ + GSource *source; + guint id; + + source = g_timeout_source_new (interval); + g_source_set_priority (source, priority); + g_source_set_callback (source, function, data, notify); + id = g_source_attach (source, spi_context); + g_source_unref (source); + return id; } diff -Nru at-spi2-atk-2.34.1/atk-adaptor/event.h at-spi2-atk-2.34.2/atk-adaptor/event.h --- at-spi2-atk-2.34.1/atk-adaptor/event.h 2019-10-07 18:25:50.000000000 +0000 +++ at-spi2-atk-2.34.2/atk-adaptor/event.h 2020-02-29 22:37:19.000000000 +0000 @@ -34,4 +34,6 @@ 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 */ diff -Nru at-spi2-atk-2.34.1/atk-adaptor/meson.build at-spi2-atk-2.34.2/atk-adaptor/meson.build --- at-spi2-atk-2.34.1/atk-adaptor/meson.build 2019-10-07 18:25:50.000000000 +0000 +++ at-spi2-atk-2.34.2/atk-adaptor/meson.build 2020-02-29 22:37:19.000000000 +0000 @@ -14,21 +14,21 @@ install_headers([ 'atk-bridge.h' ], subdir: join_paths(meson.project_name(), '2.0')) -libatk_bridge = shared_library('atk-bridge-2.0', atk_bridge_sources, - include_directories: root_inc, - dependencies: [ - libatk_bridge_adaptors_dep, - libdroute_dep, - libdbus_dep, - gmodule_dep, - gobject_dep, - atk_dep, - atspi_dep, - ], - c_args: p2p_cflags, - version: atk_bridge_libversion, - soversion: atk_bridge_soversion, - install: true) +libatk_bridge = library('atk-bridge-2.0', atk_bridge_sources, + include_directories: root_inc, + dependencies: [ + libatk_bridge_adaptors_dep, + libdroute_dep, + libdbus_dep, + gmodule_dep, + gobject_dep, + atk_dep, + atspi_dep, + ], + c_args: p2p_cflags, + version: atk_bridge_libversion, + soversion: atk_bridge_soversion, + install: true) libatk_bridge_dep = declare_dependency(link_with: libatk_bridge, include_directories: [ diff -Nru at-spi2-atk-2.34.1/debian/changelog at-spi2-atk-2.34.2/debian/changelog --- at-spi2-atk-2.34.1/debian/changelog 2020-03-18 16:48:58.000000000 +0000 +++ at-spi2-atk-2.34.2/debian/changelog 2020-05-09 13:50:02.000000000 +0000 @@ -1,3 +1,33 @@ +at-spi2-atk (2.34.2-0ubuntu2~20.04.1) focal; urgency=medium + + * No-change backport from groovy to focal. (LP: #1877093) + + -- Iain Lane Sat, 09 May 2020 14:50:02 +0100 + +at-spi2-atk (2.34.2-0ubuntu2) groovy; urgency=medium + + * Bring back use_system_atk_adaptor.patch, which is still used by the tests. + Don't put it in debian/patches, otherwise when you use gbp pq it'll be + dropped as unused. Put it in debian/test-patches/ instead, and then you + can use `QUILT_PATCHES=debian/test-patches/ quilt push -a` to change it if + you need to. + + -- Iain Lane Sat, 09 May 2020 14:49:18 +0100 + +at-spi2-atk (2.34.2-0ubuntu1) groovy; urgency=medium + + [ Samuel Thibault ] + * control: Update alioth list domain. + + [ Iain Lane ] + * New upstream release + + Meson: don't hard-code shared_library + + Mitigate missing window events at startup + + Set C standard to gnu99 + + Tests: include sys/time.h + + -- Iain Lane Wed, 06 May 2020 11:22:36 +0100 + at-spi2-atk (2.34.1-3) unstable; urgency=medium [ Steve Langasek ] diff -Nru at-spi2-atk-2.34.1/debian/control at-spi2-atk-2.34.2/debian/control --- at-spi2-atk-2.34.1/debian/control 2020-03-18 16:36:20.000000000 +0000 +++ at-spi2-atk-2.34.2/debian/control 2020-05-09 13:50:02.000000000 +0000 @@ -1,7 +1,7 @@ Source: at-spi2-atk Section: misc Priority: optional -Maintainer: Debian Accessibility Team +Maintainer: Debian Accessibility Team Uploaders: Samuel Thibault , Jordi Mallach Vcs-Browser: https://salsa.debian.org/a11y-team/at-spi2-atk diff -Nru at-spi2-atk-2.34.1/debian/patches/series at-spi2-atk-2.34.2/debian/patches/series --- at-spi2-atk-2.34.1/debian/patches/series 2020-03-08 15:23:40.000000000 +0000 +++ at-spi2-atk-2.34.2/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -startup_events - -#use_system_atk_adaptor.patch diff -Nru at-spi2-atk-2.34.1/debian/patches/startup_events at-spi2-atk-2.34.2/debian/patches/startup_events --- at-spi2-atk-2.34.1/debian/patches/startup_events 2020-03-08 15:23:40.000000000 +0000 +++ at-spi2-atk-2.34.2/debian/patches/startup_events 1970-01-01 00:00:00.000000000 +0000 @@ -1,168 +0,0 @@ -commit 8cdf4d30c74e475146a47f0bb1c9992f4a3ac372 -Author: Colomban Wendling -Date: Tue Dec 3 17:09:55 2019 +0100 - - 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 - -diff --git a/atk-adaptor/bridge.c b/atk-adaptor/bridge.c -index 06407f4..8579185 100644 ---- a/atk-adaptor/bridge.c -+++ b/atk-adaptor/bridge.c -@@ -403,8 +403,8 @@ register_reply (DBusPendingCall *pending, void *user_data) - get_registered_event_listeners (spi_global_app_data); - } - --gboolean --_atk_bridge_register_application (gpointer data) -+static gboolean -+register_application (gpointer data) - { - SpiBridge * app = data; - DBusMessage *message; -@@ -439,6 +439,31 @@ _atk_bridge_register_application (gpointer data) - return FALSE; - } - -+void -+_atk_bridge_schedule_application_registration (SpiBridge *app) -+{ -+ /* We need the callback to be called first thing, before any other of ours -+ * (and possibly of client apps), so use a high priority and a short timeout -+ * to try and be called first by the main loop. */ -+ if (!app->registration_pending) -+ app->registration_pending = spi_timeout_add_full (G_PRIORITY_HIGH, 0, -+ register_application, -+ app, NULL); -+} -+ -+gboolean -+_atk_bridge_remove_pending_application_registration (SpiBridge *app) -+{ -+ if (app->registration_pending) -+ { -+ g_source_remove (app->registration_pending); -+ app->registration_pending = 0; -+ return TRUE; -+ } -+ -+ return FALSE; -+} -+ - /*---------------------------------------------------------------------------*/ - - static void -@@ -470,12 +495,8 @@ deregister_application (SpiBridge * app) - DBusMessageIter iter; - const char *uname; - -- if (spi_global_app_data->registration_pending) -- { -- g_source_remove (spi_global_app_data->registration_pending); -- spi_global_app_data->registration_pending = 0; -+ if (_atk_bridge_remove_pending_application_registration (spi_global_app_data)) - return; -- } - - message = dbus_message_new_method_call (SPI_DBUS_NAME_REGISTRY, - ATSPI_DBUS_PATH_REGISTRY, -@@ -850,7 +871,7 @@ signal_filter (DBusConnection *bus, DBusMessage *message, void *user_data) - { - if (registry_lost && !old[0]) - { -- _atk_bridge_register_application (spi_global_app_data); -+ register_application (spi_global_app_data); - registry_lost = FALSE; - } - else if (!new[0]) -@@ -1105,9 +1126,8 @@ atk_bridge_adaptor_init (gint * argc, gchar ** argv[]) - NULL); - - /* Register this app by sending a signal out to AT-SPI registry daemon */ -- if (!atspi_no_register && (!root || !ATK_IS_PLUG (root)) && -- !spi_global_app_data->registration_pending) -- spi_global_app_data->registration_pending = spi_idle_add (_atk_bridge_register_application, spi_global_app_data); -+ if (!atspi_no_register && (!root || !ATK_IS_PLUG (root))) -+ _atk_bridge_schedule_application_registration (spi_global_app_data); - else - get_registered_event_listeners (spi_global_app_data); - -diff --git a/atk-adaptor/bridge.h b/atk-adaptor/bridge.h -index c4ceca1..9fc10fd 100644 ---- a/atk-adaptor/bridge.h -+++ b/atk-adaptor/bridge.h -@@ -94,7 +94,8 @@ DRoutePropertyFunction _atk_bridge_find_property_func (const char *property, - - GType _atk_bridge_type_from_iface (const char *iface); - --gboolean _atk_bridge_register_application (gpointer data); -+void _atk_bridge_schedule_application_registration (SpiBridge *app); -+gboolean _atk_bridge_remove_pending_application_registration (SpiBridge *app); - G_END_DECLS - - #endif /* BRIDGE_H */ -diff --git a/atk-adaptor/event.c b/atk-adaptor/event.c -index e527d45..bd38eef 100644 ---- a/atk-adaptor/event.c -+++ b/atk-adaptor/event.c -@@ -73,11 +73,8 @@ switch_main_context (GMainContext *cnx) - for (list = spi_global_app_data->direct_connections; list; list = list->next) - atspi_dbus_connection_setup_with_g_main (list->data, cnx); - -- if (spi_global_app_data->registration_pending) -- { -- g_source_remove (spi_global_app_data->registration_pending); -- spi_global_app_data->registration_pending = spi_idle_add (_atk_bridge_register_application, spi_global_app_data); -- } -+ if (_atk_bridge_remove_pending_application_registration (spi_global_app_data)) -+ _atk_bridge_schedule_application_registration (spi_global_app_data); - } - - guint -@@ -108,6 +105,22 @@ spi_timeout_add_seconds (gint interval, GSourceFunc function, gpointer data) - return id; - } - -+guint -+spi_timeout_add_full (gint priority, guint interval, GSourceFunc function, -+ gpointer data, GDestroyNotify notify) -+{ -+ GSource *source; -+ guint id; -+ -+ source = g_timeout_source_new (interval); -+ g_source_set_priority (source, priority); -+ g_source_set_callback (source, function, data, notify); -+ id = g_source_attach (source, spi_context); -+ g_source_unref (source); -+ -+ return id; -+} -+ - static void - set_reply (DBusPendingCall * pending, void *user_data) - { -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 */ diff -Nru at-spi2-atk-2.34.1/debian/patches/use_system_atk_adaptor.patch at-spi2-atk-2.34.2/debian/patches/use_system_atk_adaptor.patch --- at-spi2-atk-2.34.1/debian/patches/use_system_atk_adaptor.patch 2019-12-03 22:25:06.000000000 +0000 +++ at-spi2-atk-2.34.2/debian/patches/use_system_atk_adaptor.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -diff --git a/meson.build b/meson.build -index 65be8ec..dd6bb77 100644 ---- a/meson.build -+++ b/meson.build -@@ -60,5 +60,6 @@ install_data('at-spi2-atk.desktop', - install_dir: join_paths(get_option('libdir'), 'gnome-settings-daemon-3.0', 'gtk-modules')) - - subdir('droute') --subdir('atk-adaptor') -+#subdir('atk-adaptor') -+libatk_bridge_dep = dependency('atk-bridge-2.0') - subdir('tests') diff -Nru at-spi2-atk-2.34.1/debian/test-patches/series at-spi2-atk-2.34.2/debian/test-patches/series --- at-spi2-atk-2.34.1/debian/test-patches/series 1970-01-01 00:00:00.000000000 +0000 +++ at-spi2-atk-2.34.2/debian/test-patches/series 2020-05-09 13:50:02.000000000 +0000 @@ -0,0 +1 @@ +use_system_atk_adaptor.patch diff -Nru at-spi2-atk-2.34.1/debian/test-patches/use_system_atk_adaptor.patch at-spi2-atk-2.34.2/debian/test-patches/use_system_atk_adaptor.patch --- at-spi2-atk-2.34.1/debian/test-patches/use_system_atk_adaptor.patch 1970-01-01 00:00:00.000000000 +0000 +++ at-spi2-atk-2.34.2/debian/test-patches/use_system_atk_adaptor.patch 2020-05-09 13:50:02.000000000 +0000 @@ -0,0 +1,12 @@ +diff --git a/meson.build b/meson.build +index 65be8ec..dd6bb77 100644 +--- a/meson.build ++++ b/meson.build +@@ -60,5 +60,6 @@ install_data('at-spi2-atk.desktop', + install_dir: join_paths(get_option('libdir'), 'gnome-settings-daemon-3.0', 'gtk-modules')) + + subdir('droute') +-subdir('atk-adaptor') ++#subdir('atk-adaptor') ++libatk_bridge_dep = dependency('atk-bridge-2.0') + subdir('tests') diff -Nru at-spi2-atk-2.34.1/debian/tests/tests at-spi2-atk-2.34.2/debian/tests/tests --- at-spi2-atk-2.34.1/debian/tests/tests 2020-03-08 15:23:40.000000000 +0000 +++ at-spi2-atk-2.34.2/debian/tests/tests 2020-05-09 13:50:02.000000000 +0000 @@ -5,7 +5,7 @@ WORKDIR=$AUTOPKGTEST_TMP SRCDIR=$PWD -patch -p1 < debian/patches/use_system_atk_adaptor.patch 2>&1 || true +patch -p1 < debian/test-patches/use_system_atk_adaptor.patch 2>&1 || true cd $WORKDIR if [ -n "$DEB_HOST_GNU_TYPE" ]; then @@ -25,4 +25,4 @@ xvfb-run -s -noreset -a dbus-run-session --dbus-daemon $SRCDIR/debian/tests/dbus-daemon -- ninja test -v cd $SRCDIR -patch -p1 -R < debian/patches/use_system_atk_adaptor.patch +patch -p1 -R < debian/test-patches/use_system_atk_adaptor.patch diff -Nru at-spi2-atk-2.34.1/meson.build at-spi2-atk-2.34.2/meson.build --- at-spi2-atk-2.34.1/meson.build 2019-10-07 18:25:50.000000000 +0000 +++ at-spi2-atk-2.34.2/meson.build 2020-02-29 22:37:19.000000000 +0000 @@ -1,10 +1,10 @@ project('at-spi2-atk', 'c', - version: '2.34.1', + version: '2.34.2', license: 'LGPLv2.1+', default_options: [ 'buildtype=debugoptimized', 'warning_level=1', - 'c_std=c99', + 'c_std=gnu99', ], meson_version : '>= 0.40.1') @@ -46,8 +46,8 @@ glib_dep = dependency('glib-2.0', version: glib_req_version) gobject_dep = dependency('gobject-2.0', version: gobject_req_version) gmodule_dep = dependency('gmodule-2.0', version: gmodule_req_version) -atk_dep = dependency('atk', version: atk_req_version) -atspi_dep = dependency('atspi-2', version: atspi_req_version) +atk_dep = dependency('atk', version: atk_req_version, fallback : ['atk', 'libatk_dep']) +atspi_dep = dependency('atspi-2', version: atspi_req_version, fallback : ['at-spi2-core', 'atspi_dep']) libxml_dep = dependency('libxml-2.0', version: libxml_req_version, required: false) if get_option('disable_p2p') diff -Nru at-spi2-atk-2.34.1/NEWS at-spi2-atk-2.34.2/NEWS --- at-spi2-atk-2.34.1/NEWS 2019-10-07 18:25:50.000000000 +0000 +++ at-spi2-atk-2.34.2/NEWS 2020-02-29 22:37:19.000000000 +0000 @@ -1,3 +1,13 @@ +What's new in at-spi2-atk 2.34.2: + +* Meson: don't hard-code shared_library (!19). + +* Mitigate missing window events at startup. + +* Set C standard to gnu99 (#10). + +* Tests: include sys/time.h (#14). + What's new in at-spi2-atk 2.34.1: * socket_embed_hook: Make plug_id parameter const. @@ -8,7 +18,7 @@ What's new in at-spi2-atk 2.33.92: -* License is now lGPL-2.1+. +* License is now LGPL-2.1+. * Several test fixes (thanks to Samuel THibault). * Initialize desktop name/path early; needed since we now defer registration. diff -Nru at-spi2-atk-2.34.1/subprojects/atk.wrap at-spi2-atk-2.34.2/subprojects/atk.wrap --- at-spi2-atk-2.34.1/subprojects/atk.wrap 1970-01-01 00:00:00.000000000 +0000 +++ at-spi2-atk-2.34.2/subprojects/atk.wrap 2020-02-29 22:37:19.000000000 +0000 @@ -0,0 +1,5 @@ +[wrap-git] +directory=atk +url=https://gitlab.gnome.org/GNOME/atk.git +push-url=git@gitlab.gnome.org:GNOME/atk.git +revision=master diff -Nru at-spi2-atk-2.34.1/subprojects/at-spi2-core.wrap at-spi2-atk-2.34.2/subprojects/at-spi2-core.wrap --- at-spi2-atk-2.34.1/subprojects/at-spi2-core.wrap 1970-01-01 00:00:00.000000000 +0000 +++ at-spi2-atk-2.34.2/subprojects/at-spi2-core.wrap 2020-02-29 22:37:19.000000000 +0000 @@ -0,0 +1,5 @@ +[wrap-git] +directory=at-spi2-core +url=https://gitlab.gnome.org/GNOME/at-spi2-core.git +push-url=git@gitlab.gnome.org:GNOME/at-spi2-core.git +revision=master diff -Nru at-spi2-atk-2.34.1/tests/atk_test_util.h at-spi2-atk-2.34.2/tests/atk_test_util.h --- at-spi2-atk-2.34.1/tests/atk_test_util.h 2019-10-07 18:25:50.000000000 +0000 +++ at-spi2-atk-2.34.2/tests/atk_test_util.h 2020-02-29 22:37:19.000000000 +0000 @@ -26,6 +26,7 @@ #include #include +#include #include #include #include