[java-atk-wrapper] AtkWrapper: implement g_cond_wait
- From: Magdalen Berns <mberns src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [java-atk-wrapper] AtkWrapper: implement g_cond_wait
- Date: Fri, 2 Jan 2015 14:23:46 +0000 (UTC)
commit 6bdf1ec5eed68adf1e787811a1d0323c8accbafe
Author: Magdalen Berns <m berns thismagpie com>
Date: Fri Jan 2 14:20:02 2015 +0000
AtkWrapper: implement g_cond_wait
Removing this just meant that the a11y wrapper got bypassed so
it needs to be there
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=742157
jni/src/AtkWrapper.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/jni/src/AtkWrapper.c b/jni/src/AtkWrapper.c
index 559c555..a6e32d1 100644
--- a/jni/src/AtkWrapper.c
+++ b/jni/src/AtkWrapper.c
@@ -201,6 +201,8 @@ JNICALL Java_org_GNOME_Accessibility_AtkWrapper_loadAtkBridge(JNIEnv *jniEnv,
// Enable ATK Bridge so we can load it now
g_setenv("NO_AT_BRIDGE", "0", TRUE);
+ const gchar *name = "loaded-bridge";
+
GMainLoop *main_loop = g_main_loop_new( NULL, FALSE );
g_idle_add(jaw_load_atk_bridge, NULL);
@@ -210,10 +212,13 @@ JNICALL Java_org_GNOME_Accessibility_AtkWrapper_loadAtkBridge(JNIEnv *jniEnv,
// registered before any emission of AWT event.
g_mutex_lock(&atk_bridge_mutex);
- GThread *main_loop_thread = g_thread_new("atk_bridge_adaptor_init",
- jni_main_loop,
+ GThread *main_loop_thread = g_thread_new(name,
+ jni_main_loop,
(gpointer)main_loop);
-
+ while ((gpointer)main_loop)
+ {
+ g_cond_wait(&atk_bridge_cond, &atk_bridge_mutex);
+ }
g_mutex_unlock(&atk_bridge_mutex);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]