提交 fb0ee5e8 编写于 作者: A art

6707023: Chenese Characters in JTextPane Cause Pane to Hang

Summary: input method events are dispatched to correct AppContext
Reviewed-by: naoto, yan
上级 61d076e5
......@@ -548,11 +548,15 @@ public class WInputMethod extends InputMethodAdapter
public void inquireCandidatePosition()
{
Component source = getClientComponent();
if (source == null) {
return;
}
// This call should return immediately just to cause
// InputMethodRequests.getTextLocation be called within
// AWT Event thread. Otherwise, a potential deadlock
// could happen.
java.awt.EventQueue.invokeLater(new Runnable() {
Runnable r = new Runnable() {
public void run() {
int x = 0;
int y = 0;
......@@ -573,7 +577,9 @@ public class WInputMethod extends InputMethodAdapter
openCandidateWindow(awtFocussedComponentPeer, x, y);
}
});
};
WToolkit.postEvent(WToolkit.targetToAppContext(source),
new InvocationEvent(source, r));
}
// java.awt.Toolkit#getNativeContainer() is not available
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册