7146572: enableInputMethod(false) does not work in the TextArea and TextField on the linux platform
authoranthony
Tue, 21 Feb 2012 18:15:14 +0400
changeset 11979 b11fc42b754a
parent 11978 bacd0736cdd3
child 11980 da6a2d56e693
7146572: enableInputMethod(false) does not work in the TextArea and TextField on the linux platform Summary: Peers' constructors shouldn't override user's enableInputMethod() settings Reviewed-by: anthony Contributed-by: Charles Lee <littlee@linux.vnet.ibm.com>
jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java
jdk/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java
--- a/jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java	Tue Feb 21 15:34:08 2012 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java	Tue Feb 21 18:15:14 2012 +0400
@@ -105,7 +105,6 @@
         this.target = target;
 
         //ComponentAccessor.enableEvents(target,AWTEvent.MOUSE_WHEEL_EVENT_MASK);
-        target.enableInputMethods(true);
 
         firstChangeSkipped = false;
         String text = ((TextArea)target).getText();
@@ -113,7 +112,6 @@
         jtext.setWrapStyleWord(true);
         jtext.getDocument().addDocumentListener(jtext);
         XToolkit.specialPeerMap.put(jtext,this);
-        jtext.enableInputMethods(true);
         textPane = new AWTTextPane(jtext,this, target.getParent());
 
         setBounds(x, y, width, height, SET_BOUNDS);
--- a/jdk/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java	Tue Feb 21 15:34:08 2012 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java	Tue Feb 21 18:15:14 2012 +0400
@@ -73,8 +73,6 @@
         xtext = new XAWTTextField(text,this, target.getParent());
         xtext.getDocument().addDocumentListener(xtext);
         xtext.setCursor(target.getCursor());
-        target.enableInputMethods(true);
-        xtext.enableInputMethods(true);
         XToolkit.specialPeerMap.put(xtext,this);
 
         TextField txt = (TextField) target;