JDK-6944561 : Mouse cursor stays in Text mode after leaving JTextArea or JTextField (Motif-based Toolkit only)
Type:Bug
Component:client-libs
Sub-Component:java.awt
Affected Version:6u18
Priority:P2
Status:Closed
Resolution:Fixed
OS:solaris
CPU:sparc
Submitted:2010-04-16
Updated:2011-02-22
Resolved:2010-07-22
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
With Java SE 6, the mouse cursor stays in Text mode after leaving a JTextField or JTextArea instead of coming back to the deafult arrow cursor.
This only occurs with Motif-based Toolkit.
Comments
EVALUATION
4525839 (eliminate use of finalizers) introduced new method setPData (long pData) in class Cursor. In MToolkit it is called from native getCursor() via JNI call:
(*env)->CallVoidMethod(env, jCur, cursorIDs.mSetPData, xcursor);
The problem is xcursor's width, that is 32-bit int. setPData expects 64-bit value as an argument. On little-endian arch the four most significant bytes of parameter receive incorrect values. On big-endian arch xcursor's value is assigned to four most significant bytes of pData, and four least significant bytes receive random values. When pData's value is assigned to 32-bit var again, on big-endian it receives incorrect value from four least significant bytes. Hence, the issue appears on sparc.