From: Bartlomiej Grzelewski Date: Wed, 10 Mar 2021 08:47:38 +0000 (+0100) Subject: 2.38.0 X-Git-Tag: upstream/2.38.0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=56c80156e2605d8d64ba378aaff060f07839941e;p=platform%2Fupstream%2Fat-spi2-atk.git 2.38.0 Change-Id: I53950529b3beeb7dcefeb64592b213b278d898be --- diff --git a/NEWS b/NEWS index 874dd6d..6170649 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,19 @@ +What's new in at-spi2-atk 2.37.90: + +* Add support for the new mark and suggestion roles (!21). + +* Meson: add tests option (!22). + +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 +24,7 @@ What's new in at-spi2-atk 2.34.0: 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 --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 --git a/atk-adaptor/meson.build b/atk-adaptor/meson.build index 69685e3..18d9427 100644 --- a/atk-adaptor/meson.build +++ b/atk-adaptor/meson.build @@ -14,21 +14,21 @@ atk_bridge_sources = [ 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 --git a/atk-adaptor/object.c b/atk-adaptor/object.c index d05ff8c..27b660b 100644 --- a/atk-adaptor/object.c +++ b/atk-adaptor/object.c @@ -485,6 +485,8 @@ init_role_lookup_table (AtspiRole * role_table) role_table[ATK_ROLE_FOOTNOTE] = ATSPI_ROLE_FOOTNOTE; role_table[ATK_ROLE_CONTENT_DELETION] = ATSPI_ROLE_CONTENT_DELETION; role_table[ATK_ROLE_CONTENT_INSERTION] = ATSPI_ROLE_CONTENT_INSERTION; + role_table[ATK_ROLE_MARK] = ATSPI_ROLE_MARK; + role_table[ATK_ROLE_SUGGESTION] = ATSPI_ROLE_SUGGESTION; return TRUE; } diff --git a/meson.build b/meson.build index 906dda6..33692aa 100644 --- a/meson.build +++ b/meson.build @@ -1,10 +1,10 @@ project('at-spi2-atk', 'c', - version: '2.34.1', + version: '2.38.0', license: 'LGPLv2.1+', default_options: [ 'buildtype=debugoptimized', 'warning_level=1', - 'c_std=c99', + 'c_std=gnu99', ], meson_version : '>= 0.40.1') @@ -38,7 +38,7 @@ libdbus_req_version = '>= 1.5' glib_req_version = '>= 2.32.0' gobject_req_version = '>= 2.0.0' gmodule_req_version = '>= 2.0.0' -atk_req_version = '>= 2.33.3' +atk_req_version = '>= 2.36.0' atspi_req_version = '>= 2.33.2' libxml_req_version = '>= 2.9.1' @@ -46,8 +46,8 @@ libdbus_dep = dependency('dbus-1', version: libdbus_req_version) 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') @@ -61,4 +61,6 @@ install_data('at-spi2-atk.desktop', subdir('droute') subdir('atk-adaptor') -subdir('tests') +if get_option('tests') + subdir('tests') +endif diff --git a/meson_options.txt b/meson_options.txt index 24c9228..a4abdc2 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -2,3 +2,7 @@ option('disable_p2p', description: 'Disable peer-to-peer DBus connections', type: 'boolean', value: false) +option('tests', + description: 'Whether to build tests', + type: 'boolean', + value: true) diff --git a/subprojects/at-spi2-core.wrap b/subprojects/at-spi2-core.wrap new file mode 100644 index 0000000..2ed1f3e --- /dev/null +++ b/subprojects/at-spi2-core.wrap @@ -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 --git a/subprojects/atk.wrap b/subprojects/atk.wrap new file mode 100644 index 0000000..8666a3a --- /dev/null +++ b/subprojects/atk.wrap @@ -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 --git a/tests/atk_test_util.h b/tests/atk_test_util.h index d69e650..98a2c01 100644 --- a/tests/atk_test_util.h +++ b/tests/atk_test_util.h @@ -26,6 +26,7 @@ #include #include +#include #include #include #include