mirror of
https://github.com/openjdk/jdk.git
synced 2026-07-11 11:39:30 +00:00
6789984: JPasswordField can not receive keyboard input
Reviewed-by: naoto, anthony
This commit is contained in:
parent
f7ee6989a0
commit
b05c04c8c0
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* 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
|
||||
public void disableNativeIM() {
|
||||
InputMethod inputMethod = getInputMethod();
|
||||
if (inputMethod != null && inputMethod instanceof InputMethodAdapter) {
|
||||
((InputMethodAdapter)inputMethod).disableInputMethod();
|
||||
((InputMethodAdapter)inputMethod).stopListening();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -79,7 +79,6 @@ public abstract class InputMethodAdapter implements InputMethod {
|
||||
|
||||
/**
|
||||
* 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() {
|
||||
// ignore - adapters can override if needed
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -415,6 +415,10 @@ public abstract class X11InputMethod extends InputMethodAdapter {
|
||||
setXICFocus(getPeer(lastXICFocussedComponent), false, isLastXICActive);
|
||||
lastXICFocussedComponent = null;
|
||||
isLastXICActive = false;
|
||||
|
||||
resetXIC();
|
||||
needResetXICClient = null;
|
||||
needResetXIC = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user