JDK-5097531 : Mouse Cursor should be the default cursor when ALT key is pressed, on win32
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.2.2,5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_2000,windows_xp
  • CPU: x86
  • Submitted: 2004-09-06
  • Updated: 2005-12-02
  • Resolved: 2004-10-25
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.

To download the current JDK release, click here.
Other JDK 6
1.4.2_11Fixed 6 b10Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
I have a frame with a button. I have set WAIT_CURSOR for the button. Once the frame is shown, I am pressing & releasing 'ALT' key. Since there is no menubar in my application, windows grab the mouse and the wait cursor changes to the default cursor. After this I am noticing 2 things.

1. When I take the mouse out of the component and bring it back, the cursor changes to WAIT cursor again. This should not happen. It should remain as default cursor until the user presses ALT again.

2. As mentioned in point-1 the cursor changes to component specific cursor when the mouse pointer goes out of the component and enters again. Now when I move the mouse to the periphery of the frame, it should normally show the resize cursor. But since ALT key is pressed once, it should display the default cursor. But currently it displays the cursor of the component last visited. 

This is noticed only on Win32 platforms on all releases. 

I have attached a sample test. Execute it on WinXP.

1. You would see a frame and a button
2. Move the mouse over button. WAIT cursor should appear.
3. Press ALT key once and release.
4. The WAIT cursor should change to default cursor.
5. Move the mouse out of the component and bring it back into the component.
6. If the cursor changes to WAIT cursor, the bug is reproduced.
7. while the WAIT cursor is being shown, move the cursor over the frame's periphery. If wait cursor is still shown, the bug is reproduced (issue-2).

I think the fix for issue-1 would automatically resolve issue-2.

CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mustang

EVALUATION Name: at153223 Date: 09/09/2004 I reproduced it with 1.5.0-rc-b63 on Windows. The problem should be resolved in mustang. ###@###.### 09/09/2004 ====================================================================== This bug is caused by a fix to 4372119 (updating cursor on WM_AWT_MOUSEENTER, which does not honor mouse capture). It's possible to fix this quickly by checking for capture before cursor change. Maybe WM_AWT_MOUSEENTER/EXIT should generally honor mouse capture. ###@###.### 2004-09-29