United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-5097531 : Mouse Cursor should be the default cursor when ALT key is pressed, on win32

Details
Type:
Bug
Submit Date:
2004-09-06
Status:
Closed
Updated Date:
2005-12-02
Project Name:
JDK
Resolved Date:
2004-10-25
Component:
client-libs
OS:
windows_xp,windows_2000
Sub-Component:
java.awt
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.2.2,5.0
Fixed Versions:

Related Reports
Backport:
Backport:
Duplicate:
Relates:
Relates:
Relates:
Relates:

Sub Tasks

Description
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.

                                    

Comments
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
                                     
2004-09-29
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
mustang


                                     
2004-09-30



Hardware and Software, Engineered to Work Together