提交 3a1dd0e5 编写于 作者: A azvegint

8072448: Can not input Japanese in JTextField on RedHat Linux

Reviewed-by: alexsch, serb
上级 6f02f9a3
/* /*
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -904,7 +904,6 @@ static void adjustStatusWindow(Window shell){ ...@@ -904,7 +904,6 @@ static void adjustStatusWindow(Window shell){
static Bool static Bool
createXIC(JNIEnv * env, X11InputMethodData *pX11IMData, Window w) createXIC(JNIEnv * env, X11InputMethodData *pX11IMData, Window w)
{ {
XIC active_ic, passive_ic;
XVaNestedList preedit = NULL; XVaNestedList preedit = NULL;
XVaNestedList status = NULL; XVaNestedList status = NULL;
XIMStyle on_the_spot_styles = XIMPreeditCallbacks, XIMStyle on_the_spot_styles = XIMPreeditCallbacks,
...@@ -974,6 +973,12 @@ createXIC(JNIEnv * env, X11InputMethodData *pX11IMData, Window w) ...@@ -974,6 +973,12 @@ createXIC(JNIEnv * env, X11InputMethodData *pX11IMData, Window w)
} }
if (active_styles == on_the_spot_styles) { if (active_styles == on_the_spot_styles) {
pX11IMData->ic_passive = XCreateIC(X11im,
XNClientWindow, w,
XNFocusWindow, w,
XNInputStyle, passive_styles,
NULL);
callbacks = (XIMCallback *)malloc(sizeof(XIMCallback) * NCALLBACKS); callbacks = (XIMCallback *)malloc(sizeof(XIMCallback) * NCALLBACKS);
if (callbacks == (XIMCallback *)NULL) if (callbacks == (XIMCallback *)NULL)
return False; return False;
...@@ -1024,12 +1029,6 @@ createXIC(JNIEnv * env, X11InputMethodData *pX11IMData, Window w) ...@@ -1024,12 +1029,6 @@ createXIC(JNIEnv * env, X11InputMethodData *pX11IMData, Window w)
NULL); NULL);
XFree((void *)preedit); XFree((void *)preedit);
#endif /* __linux__ || MACOSX */ #endif /* __linux__ || MACOSX */
pX11IMData->ic_passive = XCreateIC(X11im,
XNClientWindow, w,
XNFocusWindow, w,
XNInputStyle, passive_styles,
NULL);
} else { } else {
pX11IMData->ic_active = XCreateIC(X11im, pX11IMData->ic_active = XCreateIC(X11im,
XNClientWindow, w, XNClientWindow, w,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册