+ 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.
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.
* atk-adaptor: don't emit a critical in case the bridge was not initialized
(BGO#684334).
-
+
* Remove dbind (it was only used for the droute test).
* Fix a crash in socket_embed_hook if spi_global_register is NULL.
* Fix for BGO#663876: Make sure the a11y hierarchy under an AtkPlug is
generated when embedding.
-
+
What's new in at-spi2-atk 2.3.1:
* Fix a small coding error that could generate compiler warnings.
}
prop->name = g_strdup (property);
- evdata->properties = g_slist_append (evdata->properties, prop);
+
+ if (evdata)
+ {
+ evdata->properties = g_slist_append (evdata->properties, prop);
+ }
}
static void
{
DBusMessage *message;
DBusPendingCall *pending = NULL;
+ dbus_bool_t result;
message = dbus_message_new_method_call (SPI_DBUS_NAME_REGISTRY,
ATSPI_DBUS_PATH_REGISTRY,
if (!message)
return;
- dbus_connection_send_with_reply (app->bus, message, &pending, -1);
+ result = dbus_connection_send_with_reply (app->bus, message, &pending, -1);
dbus_message_unref (message);
- if (!pending)
+ if (!result || !pending)
{
spi_global_app_data->events_initialized = TRUE;
return;
if (!message)
return;
pending = NULL;
- dbus_connection_send_with_reply (app->bus, message, &pending, -1);
+ result = dbus_connection_send_with_reply (app->bus, message, &pending, -1);
dbus_message_unref (message);
- if (!pending)
+ if (!result || !pending)
{
spi_global_app_data->events_initialized = TRUE;
return;
if (!message)
return;
pending = NULL;
- dbus_connection_send_with_reply (app->bus, message, &pending, -1);
+ result = dbus_connection_send_with_reply (app->bus, message, &pending, -1);
dbus_message_unref (message);
- if (!pending)
+ if (!result || !pending)
{
spi_global_app_data->events_initialized = TRUE;
return;
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;
dbus_message_iter_init_append (message, &iter);
spi_object_append_reference (&iter, app->root);
-
+
if (!dbus_connection_send_with_reply (app->bus, message, &pending, -1)
|| !pending)
{
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
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,
{
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])
/* Hook our plug-and socket functions */
install_plug_hooks ();
- /*
+ /*
* Create the leasing, register and cache objects.
* The order is important here, the cache depends on the
* register object.
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);
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
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)
{
guint text_changed_signal_id;
GSignalQuery signal_query;
const gchar *name;
- const gchar *minor_raw, *text;
+ const gchar *minor_raw, *text = NULL;
gchar *minor;
gint detail1 = 0, detail2 = 0;
else
text = "";
- emit_event (accessible, ITF_EVENT_OBJECT, name, minor, detail1, detail2,
- DBUS_TYPE_STRING_AS_STRING, text, append_basic);
+ if (text != NULL)
+ emit_event (accessible, ITF_EVENT_OBJECT, name, minor, detail1, detail2,
+ DBUS_TYPE_STRING_AS_STRING, text, append_basic);
g_free (minor);
return TRUE;
}
guint text_changed_signal_id;
GSignalQuery signal_query;
const gchar *name;
- const gchar *minor_raw, *text;
+ const gchar *minor_raw, *text = NULL;
gchar *minor;
gint detail1 = 0, detail2 = 0;
else
text = "";
- emit_event (accessible, ITF_EVENT_OBJECT, name, minor, detail1, detail2,
- DBUS_TYPE_STRING_AS_STRING, text, append_basic);
+ if (text != NULL)
+ emit_event (accessible, ITF_EVENT_OBJECT, name, minor, detail1, detail2,
+ DBUS_TYPE_STRING_AS_STRING, text, append_basic);
g_free (minor);
return TRUE;
}
dbus_message_iter_append_basic (&iter_struct, DBUS_TYPE_STRING, &name);
dbus_message_iter_append_basic (&iter_struct, DBUS_TYPE_OBJECT_PATH, &path);
dbus_message_iter_close_container (iter, &iter_struct);
-
+
g_free (path);
}
dbus_message_iter_append_basic (&iter_struct, DBUS_TYPE_STRING, &name);
dbus_message_iter_append_basic (&iter_struct, DBUS_TYPE_OBJECT_PATH, &path);
dbus_message_iter_close_container (iter, &iter_struct);
-
+
g_free (path);
}
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;
}