JDK-6519005 : regression: Selection the item on the choice don't work properly in vista ultimate.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6u10,7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp,windows_vista
  • CPU: x86
  • Submitted: 2007-01-30
  • Updated: 2011-05-17
  • Resolved: 2011-05-17
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.
JDK 6 JDK 7
6u12Fixed 7 b17Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Description
Selecting the item in the choice does not work properly when the focus is brought to & from the choice.  
Step to reproduce:
-------------------
1) Run the attached code.
2) Press "Tab" to move the focus on the Choice & move the focus back on the button  & once again on the choice.
3) Click on the choice & try selecting any item, the drop down does not close immediately after selecting the item. You have to click once again on the item to select & choice the drop down.
If you observe the same then the bug is reproduced.

Even i have added the mouseListener to the choice. clicking on the choice triggers only mousePressed event not the mouseReleased event.

This works fine in Mustang b105, Even it works fine in jdk7.0 b01 build , but fails in jkd7.0 b02 onwards. Hence this is a regression.
i tested this in vista ulitmate b6000.

Comments
EVALUATION As it was described in previous evaluation, in some cases the mouse messages are consumed. It's not a good idea to consume the mouse messages. It's better to skip the messages instead of to consume it. In this cases ::DefWindowProc(WM_LBUTTONUP) call properly processes the messages.
28-06-2007

EVALUATION There is known Windows bug (4338368): On Windows XP native system triggers spurious WM_LBUTTONUP messages when user transfers focus from choice component to another component using TAB key. This bug has been workarounded: "override WmKillFocus and WmMouseUp in awt_Choice.cpp to keep track of these events and consume extra event right after it was triggered" Hovewer, the bug is not reproducible on Vista. Nevertheless, according to the workaround we consume every next WM_LBUTTONUP event for choice :(
30-01-2007