diff -Nru at-spi2-atk-2.5.3/atk-adaptor/accessible-cache.c at-spi2-atk-2.5.4/atk-adaptor/accessible-cache.c --- at-spi2-atk-2.5.3/atk-adaptor/accessible-cache.c 2012-06-25 22:26:06.000000000 +0000 +++ at-spi2-atk-2.5.4/atk-adaptor/accessible-cache.c 2012-07-09 22:36:10.000000000 +0000 @@ -321,7 +321,6 @@ const GValue * param_values, gpointer data) { SpiCache *cache = spi_global_cache; - gboolean child_needs_ref = TRUE; AtkObject *accessible; const gchar *detail = NULL; @@ -351,14 +350,13 @@ gpointer child; int index = g_value_get_uint (param_values + 1); child = g_value_get_pointer (param_values + 2); - - if (!ATK_IS_OBJECT (child)) + if (!child) { - child = atk_object_ref_accessible_child (accessible, index); - child_needs_ref = FALSE; + g_static_rec_mutex_unlock (&cache_mutex); + return; } - if (child_needs_ref) - g_object_ref (child); + + g_object_ref (child); g_queue_push_tail (cache->add_traversal, child); if (cache->add_pending_idle == 0) diff -Nru at-spi2-atk-2.5.3/atk-adaptor/adaptors/accessible-adaptor.c at-spi2-atk-2.5.4/atk-adaptor/adaptors/accessible-adaptor.c --- at-spi2-atk-2.5.3/atk-adaptor/adaptors/accessible-adaptor.c 2012-06-25 22:26:06.000000000 +0000 +++ at-spi2-atk-2.5.4/atk-adaptor/adaptors/accessible-adaptor.c 2012-07-05 15:39:17.000000000 +0000 @@ -337,6 +337,8 @@ } dbus_message_iter_close_container (&iter, &iter_array); oom: + if (set) + g_object_unref (set); // TODO: handle out of memory */ return reply; } diff -Nru at-spi2-atk-2.5.3/atk-adaptor/adaptors/application-adaptor.c at-spi2-atk-2.5.4/atk-adaptor/adaptors/application-adaptor.c --- at-spi2-atk-2.5.3/atk-adaptor/adaptors/application-adaptor.c 2012-06-25 22:26:52.000000000 +0000 +++ at-spi2-atk-2.5.4/atk-adaptor/adaptors/application-adaptor.c 2012-07-06 00:54:28.000000000 +0000 @@ -104,6 +104,9 @@ if (bus == spi_global_app_data->bus) spi_atk_add_client (dbus_message_get_sender (msg)); + if (!spi_global_app_data->app_bus_addr) + spi_atk_create_socket (spi_global_app_data); + reply = dbus_message_new_method_return(msg); if (reply) { diff -Nru at-spi2-atk-2.5.3/atk-adaptor/bridge.c at-spi2-atk-2.5.4/atk-adaptor/bridge.c --- at-spi2-atk-2.5.3/atk-adaptor/bridge.c 2012-06-25 22:27:40.000000000 +0000 +++ at-spi2-atk-2.5.4/atk-adaptor/bridge.c 2012-07-06 00:58:36.000000000 +0000 @@ -297,18 +297,6 @@ if (message) dbus_message_unref (message); -#ifndef DISABLE_P2P - app->app_tmp_dir = g_build_filename (g_get_user_runtime_dir (), - "at-spi2-XXXXXX", NULL); - if (!g_mkdtemp (app->app_tmp_dir)) - { - g_free (app->app_tmp_dir); - app->app_tmp_dir = NULL; - return FALSE; - } - app->app_bus_addr = g_strdup_printf ("unix:path=%s/socket", app->app_tmp_dir); -#endif - return TRUE; } @@ -531,37 +519,6 @@ spi_global_app_data->direct_connections = g_list_append (spi_global_app_data->direct_connections, con); } -static int -setup_bus (void) -{ -#ifndef DISABLE_P2P - DBusServer *server; - DBusError err; - - if (!spi_global_app_data->app_bus_addr) - return -1; - - dbus_error_init(&err); - server = dbus_server_listen(spi_global_app_data->app_bus_addr, &err); - if (server == NULL) - { - g_warning ("atk-bridge: Couldn't listen on dbus server: %s", err.message); - dbus_error_init (&err); - spi_global_app_data->app_bus_addr [0] = '\0'; - g_main_context_unref (spi_global_app_data->main_context); - spi_global_app_data->main_context = NULL; - return -1; - } - - atspi_dbus_server_setup_with_g_main(server, NULL); - dbus_server_set_new_connection_function(server, new_connection_cb, NULL, NULL); - - spi_global_app_data->server = server; -#endif - - return 0; -} - gchar *atspi_dbus_name = NULL; static gboolean atspi_no_register = FALSE; @@ -716,6 +673,55 @@ return result; } +int +spi_atk_create_socket (SpiBridge *app) +{ +#ifndef DISABLE_P2P + DBusServer *server; + DBusError err; + + if (getuid () != 0) + { + app->app_tmp_dir = g_build_filename (g_get_user_runtime_dir (), + "at-spi2-XXXXXX", NULL); + if (!g_mkdtemp (app->app_tmp_dir)) + { + g_free (app->app_tmp_dir); + app->app_tmp_dir = NULL; + return FALSE; + } + } + + if (app->app_tmp_dir) + app->app_bus_addr = g_strdup_printf ("unix:path=%s/socket", app->app_tmp_dir); + else + app->app_bus_addr = g_strdup_printf ("unix:path=%s/at-spi2-socket-%d", + g_get_user_runtime_dir (), getpid ()); + + if (!spi_global_app_data->app_bus_addr) + return -1; + + dbus_error_init(&err); + server = dbus_server_listen(spi_global_app_data->app_bus_addr, &err); + if (server == NULL) + { + g_warning ("atk-bridge: Couldn't listen on dbus server: %s", err.message); + dbus_error_init (&err); + spi_global_app_data->app_bus_addr [0] = '\0'; + g_main_context_unref (spi_global_app_data->main_context); + spi_global_app_data->main_context = NULL; + return -1; + } + + atspi_dbus_server_setup_with_g_main(server, NULL); + dbus_server_set_new_connection_function(server, new_connection_cb, NULL, NULL); + + spi_global_app_data->server = server; +#endif + + return 0; +} + /* * Checks the status of the environment variables * @@ -888,8 +894,6 @@ else get_registered_event_listeners (spi_global_app_data); - setup_bus(); - return 0; } diff -Nru at-spi2-atk-2.5.3/atk-adaptor/bridge.h at-spi2-atk-2.5.4/atk-adaptor/bridge.h --- at-spi2-atk-2.5.3/atk-adaptor/bridge.h 2012-06-25 22:27:40.000000000 +0000 +++ at-spi2-atk-2.5.4/atk-adaptor/bridge.h 2012-07-06 00:54:12.000000000 +0000 @@ -70,6 +70,8 @@ void spi_atk_add_client (const char *bus_name); void spi_atk_remove_client (const char *bus_name); +int spi_atk_create_socket (SpiBridge *app); + G_END_DECLS #endif /* BRIDGE_H */ diff -Nru at-spi2-atk-2.5.3/atk-adaptor/event.c at-spi2-atk-2.5.4/atk-adaptor/event.c --- at-spi2-atk-2.5.3/atk-adaptor/event.c 2012-06-25 22:48:50.000000000 +0000 +++ at-spi2-atk-2.5.4/atk-adaptor/event.c 2012-07-09 22:31:02.000000000 +0000 @@ -64,9 +64,8 @@ { GList *list; -#ifndef DISABLE_P2P - atspi_dbus_server_setup_with_g_main (spi_global_app_data->server, cnx); -#endif + if (spi_global_app_data->server) + atspi_dbus_server_setup_with_g_main (spi_global_app_data->server, cnx); atspi_dbus_connection_setup_with_g_main (spi_global_app_data->bus, cnx); for (list = spi_global_app_data->direct_connections; list; list = list->next) atspi_dbus_connection_setup_with_g_main (list->data, cnx); @@ -372,7 +371,11 @@ * TODO: FOr 2.2, have at-spi2-core define a special "cache listener" for * this instead, so that we don't send these if no one is listening */ if (!g_strcmp0 (data [1], "ChildrenChanged") || - !g_strcmp0 (data [1], "PropertyChange") || + ((!g_strcmp0 (data [1], "PropertyChange")) && + (!g_strcmp0 (data [2], "accessible-name") || + !g_strcmp0 (data [2], "accessible-description") || + !g_strcmp0 (data [2], "accessible-parent") || + !g_strcmp0 (data [2], "accessible-role"))) || !g_strcmp0 (data [1], "StateChanged")) { g_free (data [2]); @@ -1017,6 +1020,7 @@ detail1); emit_event (accessible, ITF_EVENT_OBJECT, name, minor, detail1, detail2, "(so)", ao, append_object); + g_object_unref (ao); } else { diff -Nru at-spi2-atk-2.5.3/atk-adaptor/object.c at-spi2-atk-2.5.4/atk-adaptor/object.c --- at-spi2-atk-2.5.3/atk-adaptor/object.c 2011-07-28 16:54:50.000000000 +0000 +++ at-spi2-atk-2.5.4/atk-adaptor/object.c 2012-07-04 01:57:26.000000000 +0000 @@ -286,10 +286,14 @@ } #endif - if (ATK_IS_DOCUMENT (obj)) + if (ATK_IS_OBJECT (obj)) { itf = "org.a11y.atspi.Collection"; dbus_message_iter_append_basic (iter, DBUS_TYPE_STRING, &itf); + } + + if (ATK_IS_DOCUMENT (obj)) + { itf = ATSPI_DBUS_INTERFACE_DOCUMENT; dbus_message_iter_append_basic (iter, DBUS_TYPE_STRING, &itf); } diff -Nru at-spi2-atk-2.5.3/configure at-spi2-atk-2.5.4/configure --- at-spi2-atk-2.5.3/configure 2012-06-25 23:08:01.000000000 +0000 +++ at-spi2-atk-2.5.4/configure 2012-07-16 20:59:54.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for at-spi2-atk 2.5.3. +# Generated by GNU Autoconf 2.69 for at-spi2-atk 2.5.4. # # Report bugs to . # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='at-spi2-atk' PACKAGE_TARNAME='at-spi2-atk' -PACKAGE_VERSION='2.5.3' -PACKAGE_STRING='at-spi2-atk 2.5.3' +PACKAGE_VERSION='2.5.4' +PACKAGE_STRING='at-spi2-atk 2.5.4' PACKAGE_BUGREPORT='accessibility-atspi@lists.linux-foundation.org' PACKAGE_URL='' @@ -1400,7 +1400,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures at-spi2-atk 2.5.3 to adapt to many kinds of systems. +\`configure' configures at-spi2-atk 2.5.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1470,7 +1470,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of at-spi2-atk 2.5.3:";; + short | recursive ) echo "Configuration of at-spi2-atk 2.5.4:";; esac cat <<\_ACEOF @@ -1599,7 +1599,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -at-spi2-atk configure 2.5.3 +at-spi2-atk configure 2.5.4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1877,7 +1877,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by at-spi2-atk $as_me 2.5.3, which was +It was created by at-spi2-atk $as_me 2.5.4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2727,7 +2727,7 @@ # Define the identity of the package. PACKAGE='at-spi2-atk' - VERSION='2.5.3' + VERSION='2.5.4' cat >>confdefs.h <<_ACEOF @@ -14454,7 +14454,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by at-spi2-atk $as_me 2.5.3, which was +This file was extended by at-spi2-atk $as_me 2.5.4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14520,7 +14520,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -at-spi2-atk config.status 2.5.3 +at-spi2-atk config.status 2.5.4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru at-spi2-atk-2.5.3/configure.ac at-spi2-atk-2.5.4/configure.ac --- at-spi2-atk-2.5.3/configure.ac 2012-06-25 23:07:53.000000000 +0000 +++ at-spi2-atk-2.5.4/configure.ac 2012-07-16 20:59:47.000000000 +0000 @@ -1,4 +1,4 @@ -AC_INIT([at-spi2-atk], [2.5.3], [accessibility-atspi@lists.linux-foundation.org]) +AC_INIT([at-spi2-atk], [2.5.4], [accessibility-atspi@lists.linux-foundation.org]) AC_CONFIG_AUX_DIR(config) AT_SPI_ATK_MAJOR_VERSION=0 diff -Nru at-spi2-atk-2.5.3/debian/changelog at-spi2-atk-2.5.4/debian/changelog --- at-spi2-atk-2.5.3/debian/changelog 2012-07-05 20:44:31.000000000 +0000 +++ at-spi2-atk-2.5.4/debian/changelog 2012-07-16 23:47:39.000000000 +0000 @@ -1,3 +1,18 @@ +at-spi2-atk (2.5.4-0ubuntu1) quantal; urgency=low + + * New upstream release + - Fix for bug #679013 - AtspiCollection should be implemented for + all containers + - Don't create a (non-readable) subdirectory for the socket when root. + - Plug ref count leaks (BGO#679285). + - Only create a directory and a socket when requested. (LP: #1020512) + - Only add items to the cache on children-changed if the children are + included in the event. + - Only send PropertyChange signals used for caching, absent listeners. + * debian/patches/git_refcount_leak.patch: Dropped, applied upstream. + + -- Luke Yelavich Tue, 17 Jul 2012 09:47:36 +1000 + at-spi2-atk (2.5.3-1ubuntu1) quantal; urgency=low * debian/patches/git_refcount_leak.patch: diff -Nru at-spi2-atk-2.5.3/debian/control at-spi2-atk-2.5.4/debian/control --- at-spi2-atk-2.5.3/debian/control 2012-06-29 02:33:13.000000000 +0000 +++ at-spi2-atk-2.5.4/debian/control 2012-07-16 23:22:25.000000000 +0000 @@ -1,7 +1,8 @@ Source: at-spi2-atk Section: misc Priority: optional -Maintainer: Debian Accessibility Team +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian Accessibility Team Uploaders: Samuel Thibault , Jordi Mallach Vcs-Browser: http://anonscm.debian.org/?p=pkg-a11y/at-spi2-atk.git;a=summary diff -Nru at-spi2-atk-2.5.3/debian/gbp.conf at-spi2-atk-2.5.4/debian/gbp.conf --- at-spi2-atk-2.5.3/debian/gbp.conf 2012-06-29 02:33:13.000000000 +0000 +++ at-spi2-atk-2.5.4/debian/gbp.conf 2012-07-16 23:22:22.000000000 +0000 @@ -1,2 +1,3 @@ [DEFAULT] pristine-tar = True +debian-branch = ubuntu-quantal diff -Nru at-spi2-atk-2.5.3/debian/patches/git_refcount_leak.patch at-spi2-atk-2.5.4/debian/patches/git_refcount_leak.patch --- at-spi2-atk-2.5.3/debian/patches/git_refcount_leak.patch 2012-07-05 20:43:21.000000000 +0000 +++ at-spi2-atk-2.5.4/debian/patches/git_refcount_leak.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -From e4a899792e389b9d733f1a74702a8f4158f93acc Mon Sep 17 00:00:00 2001 -From: Cosimo Cecchi -Date: Mon, 02 Jul 2012 20:14:12 +0000 -Subject: atk-adaptor: plug a refcount leak - -https://bugzilla.gnome.org/show_bug.cgi?id=679285 ---- -diff --git a/atk-adaptor/adaptors/accessible-adaptor.c b/atk-adaptor/adaptors/accessible-adaptor.c -index 25d7823..77aacbb 100644 ---- a/atk-adaptor/adaptors/accessible-adaptor.c -+++ b/atk-adaptor/adaptors/accessible-adaptor.c -@@ -337,6 +337,8 @@ impl_GetRelationSet (DBusConnection * bus, - } - dbus_message_iter_close_container (&iter, &iter_array); - oom: -+ if (set) -+ g_object_unref (set); - // TODO: handle out of memory */ - return reply; - } -diff --git a/atk-adaptor/event.c b/atk-adaptor/event.c -index d19f451..1cbda23 100644 ---- a/atk-adaptor/event.c -+++ b/atk-adaptor/event.c -@@ -1017,6 +1017,7 @@ children_changed_event_listener (GSignalInvocationHint * signal_hint, - detail1); - emit_event (accessible, ITF_EVENT_OBJECT, name, minor, detail1, detail2, - "(so)", ao, append_object); -+ g_object_unref (ao); - } - else - { --- -cgit v0.9.0.2 - diff -Nru at-spi2-atk-2.5.3/debian/patches/series at-spi2-atk-2.5.4/debian/patches/series --- at-spi2-atk-2.5.3/debian/patches/series 2012-07-05 20:43:34.000000000 +0000 +++ at-spi2-atk-2.5.4/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -git_refcount_leak.patch diff -Nru at-spi2-atk-2.5.3/NEWS at-spi2-atk-2.5.4/NEWS --- at-spi2-atk-2.5.3/NEWS 2012-06-25 23:07:44.000000000 +0000 +++ at-spi2-atk-2.5.4/NEWS 2012-07-16 20:59:41.000000000 +0000 @@ -1,3 +1,19 @@ +What's new in at-spi2-atk 2.5.4: + + Fix for bug #679013 - AtspiCollection should be implemented for + all containers + +* Don't create a (non-readable) subdirectory for the socket when root. + +* Plug ref count leaks (BGO#679285). + +* Only create a directory and a socket when requested. + +* Only add items to the cache on children-changed if the children are + included in the event. + +* Only send PropertyChange signals used for caching, absent listeners. + What's new in at-spi2-atk 2.5.3: * Create a library (libatk-bridge), currently with atk_bridge_adaptor_init()