JDK-6519671 : Dialog is not triggering windowGainedFocus event when Deiconfied, when parent frame is nonfocusable
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6u1
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2007-01-31
  • Updated: 2011-04-29
Related Reports
Relates :  
Description
This is Defect is a regression introduce somewhere between b78 and b82.

Following are the steps to reproduce the defect
1. create a frame with setFocusableWindowState as false.
2. create a Dialog with a button.
3. add addWindowFocusListener to Dialog.
4. Iconify the frame then Dialog triggers "Focus lost" event.
5. Deiconify the frame.

Expected Result:
	Dialog should trigger "Focus Gained" event.
Actual Result:
	Dialog is Not triggering "Focus Gained" event.

This defect can be reproduced by running the attached test on windows xp.

Comments
EVALUATION The change in behaviour is most probably caused by the fix for 5091224 (integrated to 6.0-b71) when true unfocusable windows were introduced. However, this change is not the only one, the test shows a lot of different results for different JDK versions. For example, with the latest 7.0 build (~b07) no windowGainedFocus/windowLostFocus events are generated when the frame is iconified, and windowFocusLost is generated for dialog when it is restored. I expect the dialog to receive windowLostFocus when it is iconified and windowGainedFocus when it is restored.
06-02-2007