提交 df469dce 编写于 作者: A alitvinov

6789984: JPasswordField can not receive keyboard input

Reviewed-by: naoto, anthony
上级 95de8cd3
/* /*
* Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2012, 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
...@@ -786,7 +786,7 @@ public class InputContext extends java.awt.im.InputContext ...@@ -786,7 +786,7 @@ public class InputContext extends java.awt.im.InputContext
public void disableNativeIM() { public void disableNativeIM() {
InputMethod inputMethod = getInputMethod(); InputMethod inputMethod = getInputMethod();
if (inputMethod != null && inputMethod instanceof InputMethodAdapter) { if (inputMethod != null && inputMethod instanceof InputMethodAdapter) {
((InputMethodAdapter)inputMethod).disableInputMethod(); ((InputMethodAdapter)inputMethod).stopListening();
} }
} }
......
/* /*
* Copyright (c) 1997, 2005, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2012, 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
...@@ -79,7 +79,6 @@ public abstract class InputMethodAdapter implements InputMethod { ...@@ -79,7 +79,6 @@ public abstract class InputMethodAdapter implements InputMethod {
/** /**
* Informs the input method adapter not to listen to the native events. * Informs the input method adapter not to listen to the native events.
* This method is called when a Java input method is active.
*/ */
protected void stopListening() { protected void stopListening() {
// ignore - adapters can override if needed // ignore - adapters can override if needed
......
/* /*
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2012, 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
...@@ -415,6 +415,10 @@ public abstract class X11InputMethod extends InputMethodAdapter { ...@@ -415,6 +415,10 @@ public abstract class X11InputMethod extends InputMethodAdapter {
setXICFocus(getPeer(lastXICFocussedComponent), false, isLastXICActive); setXICFocus(getPeer(lastXICFocussedComponent), false, isLastXICActive);
lastXICFocussedComponent = null; lastXICFocussedComponent = null;
isLastXICActive = false; isLastXICActive = false;
resetXIC();
needResetXICClient = null;
needResetXIC = false;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册