projects
/
platform
/
core
/
uifw
/
at-spi2-atk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use atspi_is_initialized to decide whether to expose p2p connection
[platform/core/uifw/at-spi2-atk.git]
/
atk-adaptor
/
event.c
diff --git
a/atk-adaptor/event.c
b/atk-adaptor/event.c
index
859d399
..
dc4e3ec
100644
(file)
--- a/
atk-adaptor/event.c
+++ b/
atk-adaptor/event.c
@@
-98,15
+98,12
@@
send_and_allow_reentry (DBusConnection * bus, DBusMessage * message)
{
DBusPendingCall *pending;
SpiReentrantCallClosure closure;
{
DBusPendingCall *pending;
SpiReentrantCallClosure closure;
- GMainContext *main_context;
GSource *source;
GSource *source;
- main_context = (g_getenv ("AT_SPI_CLIENT") ? NULL :
- spi_global_app_data->main_context);
closure.bus = bus;
closure.bus = bus;
- closure.loop = g_main_loop_new (main_context, FALSE);
+ closure.loop = g_main_loop_new (
spi_global_app_data->
main_context, FALSE);
closure.reply = NULL;
closure.reply = NULL;
- switch_main_context (main_context);
+ switch_main_context (
spi_global_app_data->
main_context);
if (!dbus_connection_send_with_reply (bus, message, &pending, 9000) || !pending)
{
if (!dbus_connection_send_with_reply (bus, message, &pending, 9000) || !pending)
{
@@
-116,7
+113,7
@@
send_and_allow_reentry (DBusConnection * bus, DBusMessage * message)
dbus_pending_call_set_notify (pending, set_reply, (void *) &closure, NULL);
source = g_timeout_source_new (500);
g_source_set_callback (source, timeout_reply, &closure, NULL);
dbus_pending_call_set_notify (pending, set_reply, (void *) &closure, NULL);
source = g_timeout_source_new (500);
g_source_set_callback (source, timeout_reply, &closure, NULL);
- closure.timeout = g_source_attach (source, main_context);
+ closure.timeout = g_source_attach (source,
spi_global_app_data->
main_context);
g_source_unref (source);
g_main_loop_run (closure.loop);
if (closure.timeout != -1)
g_source_unref (source);
g_main_loop_run (closure.loop);
if (closure.timeout != -1)
@@
-140,7
+137,6
@@
Accessibility_DeviceEventController_NotifyListenersSync (const
* key_event)
{
DBusMessage *message;
* key_event)
{
DBusMessage *message;
- DBusError error;
dbus_bool_t consumed = FALSE;
message =
dbus_bool_t consumed = FALSE;
message =
@@
-149,7
+145,6
@@
Accessibility_DeviceEventController_NotifyListenersSync (const
ATSPI_DBUS_INTERFACE_DEC,
"NotifyListenersSync");
ATSPI_DBUS_INTERFACE_DEC,
"NotifyListenersSync");
- dbus_error_init (&error);
if (spi_dbus_marshal_deviceEvent (message, key_event))
{
DBusMessage *reply =
if (spi_dbus_marshal_deviceEvent (message, key_event))
{
DBusMessage *reply =
@@
-158,8
+153,12
@@
Accessibility_DeviceEventController_NotifyListenersSync (const
{
DBusError error;
dbus_error_init (&error);
{
DBusError error;
dbus_error_init (&error);
- dbus_message_get_args (reply, &error, DBUS_TYPE_BOOLEAN, &consumed,
- DBUS_TYPE_INVALID);
+ if (!dbus_message_get_args (reply, &error, DBUS_TYPE_BOOLEAN,
+ &consumed, DBUS_TYPE_INVALID))
+ {
+ /* TODO: print a warning */
+ dbus_error_free (&error);
+ }
dbus_message_unref (reply);
}
}
dbus_message_unref (reply);
}
}
@@
-371,7
+370,11
@@
signal_is_needed (const gchar *klass, const gchar *major, const gchar *minor)
* 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") ||
* 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]);
!g_strcmp0 (data [1], "StateChanged"))
{
g_free (data [2]);