JDK-6609494 : On MAWT TextArea, cursor keeps blinking after focus moved to a native window.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: solaris_2.5.1
  • CPU: sparc
  • Submitted: 2007-09-26
  • Updated: 2010-07-29
  • Resolved: 2007-09-27
Related Reports
Relates :  
Relates :  
Description
Reproduced on Redhat Enterprise Linux 4 (Update 4) with 1.6.0-b105.

On MAWT TextArea or TextField, cursor keeps blinking after focus moved to a native window.

Test instruction is as follows:
1. Compile and launch the sample code with MToolkit.
$ javac TextAreaTest
$ AWT_TOOLKIT=MToolkit java TextAreaTest
=> Two TextArea components will appear.

2. Move focus to "TextArea 1".

3. Move focus to another native window, like terminal.
=> Cursor is still blinking. <= Problem.

4. Move focus from the native window to "TextArea 2".
=> Both TextArea 1 and 2 show blinking cursor.  <= Problem.

Expected result:
Cursor should be pale color and stop blinking, after focus loses.

Focus change between these TextArea components, it works as expectedly.

Additional Information:
Motif's text widget doesn't get FocusOut event.

The problem didn't occur on Java5. It introduced from Java6.

======== TextAreaTest.java ====================================
import java.awt.*;
public class TextAreaTest {
        public TextAreaTest(String title) {
                Frame frame = new Frame(title);
                frame.add(new TextArea());
                frame.setSize(300, 100);
                frame.setVisible(true);
        }
        public static void main(String[] args) {
                TextAreaTest t1=new TextAreaTest("TextArea 1");
                TextAreaTest t2=new TextAreaTest("TextArea 2");
        }
}
============================================================

Comments
EVALUATION Similar bugs were fixed in 6u4 - 6547951, 6465038.
28-09-2007

EVALUATION Closing this change request as 'Will Not Fix' as MToolkit is dropped in JDK7 and is almost not supported in JDK6.
27-09-2007

EVALUATION I believe this is a pure AWT focus issue and not related with input methods. Transferring to the AWT.
26-09-2007

WORK AROUND None.
26-09-2007