< prev index next >
src/java.desktop/unix/native/libawt_xawt/awt/awt_InputMethod.c
Print this page
*** 1275,1287 ****
static void DestroyXIMCallback(XIM im, XPointer client_data, XPointer call_data) {
/* mark that XIM server was destroyed */
X11im = NULL;
JNIEnv* env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
/* free the old pX11IMData and set it to null. this also avoids crashing
* the jvm if the XIM server reappears */
! X11InputMethodData *pX11IMData = getX11InputMethodData(env, currentX11InputMethodInstance);
}
JNIEXPORT jboolean JNICALL
Java_sun_awt_X11_XInputMethod_openXIMNative(JNIEnv *env,
jobject this,
--- 1275,1292 ----
static void DestroyXIMCallback(XIM im, XPointer client_data, XPointer call_data) {
/* mark that XIM server was destroyed */
X11im = NULL;
JNIEnv* env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
+
+ AWT_LOCK();
/* free the old pX11IMData and set it to null. this also avoids crashing
* the jvm if the XIM server reappears */
! while (x11InputMethodGRefListHead != NULL) {
! getX11InputMethodData(env, x11InputMethodGRefListHead->inputMethodGRef);
! }
! AWT_UNLOCK();
}
JNIEXPORT jboolean JNICALL
Java_sun_awt_X11_XInputMethod_openXIMNative(JNIEnv *env,
jobject this,
< prev index next >