[java-atk-wrapper] JNI: create NewGlobalRef for gdk threads
- From: Magdalen Berns <mberns src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [java-atk-wrapper] JNI: create NewGlobalRef for gdk threads
- Date: Tue, 2 Jun 2015 20:01:37 +0000 (UTC)
commit 5f1dfcb2a95ada49029ce679e9660d9fa88af7d9
Author: Magdalen Berns <m berns thismagpie com>
Date: Tue Jun 2 21:00:13 2015 +0100
JNI: create NewGlobalRef for gdk threads
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=750295
jni/src/AtkWrapper.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/jni/src/AtkWrapper.c b/jni/src/AtkWrapper.c
index c59724a..067d57e 100644
--- a/jni/src/AtkWrapper.c
+++ b/jni/src/AtkWrapper.c
@@ -132,9 +132,6 @@ JNICALL Java_org_GNOME_Accessibility_AtkWrapper_initNativeLibrary(JNIEnv *jniEnv
// Force to invoke base initialization function of each ATK interfaces
g_type_class_unref(g_type_class_ref(ATK_TYPE_NO_OP_OBJECT));
- gdk_threads_set_lock_functions(jni_threads_lock, jni_threads_unlock);
- gdk_threads_init();
-
return JNI_TRUE;
}
@@ -150,6 +147,7 @@ JNICALL Java_org_GNOME_Accessibility_AtkWrapper_loadAtkBridge(JNIEnv *jniEnv,
char * message;
message = "JNI main loop";
err = NULL;
+ jobject obj;
jaw_initialized = jaw_accessibility_init();
if (jaw_debug)
@@ -165,7 +163,9 @@ JNICALL Java_org_GNOME_Accessibility_AtkWrapper_loadAtkBridge(JNIEnv *jniEnv,
g_error_free (err);
}
}
-
+ lock = (*jniEnv)->NewGlobalRef(jniEnv, obj);
+ gdk_threads_set_lock_functions(jni_threads_lock, jni_threads_unlock);
+ gdk_threads_init();
}
enum _SignalType {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]