JDK-6438993 : Modal dialog goes behind the parent frame when parent is restored from iconify state
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6,6u10
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2006-06-15
  • Updated: 2011-04-29
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
Modal dialog goes behind the parent frame when parent is restored from iconify state .

Step to reproduced
-----------------------
1) Run the attached program. You can see a frame on the screen & a TrayIcon is added to the Taskbar (systemtray) , an animated dog.
2) Right click on the TrayIcon. You can see popupmenu.
3) Select 'Dialog' menuitem. You can see a Modal dialog on the screen. Try clicking on the parent , the dialog flicker which indicates that the frame is blocked.
4) Repeat step (2).
5) Select 'Iconify' menuitem. Observe that Frame (Parent ) gets iconified, but Modal dialog does n't . ( Filed a bug on this 6438985 ).
6) Repeat step (2) 
7) Select 'Normal' menuitem. You can see that frame is restored to normal state. but dialog goes behind the frame. i,e Frame is at the top of the dialog. If you see the same then the bug is reproduced.
8) Click on the frame. Observe that dialog comes front of the frame.

This works fine in Mustang b40 & b42. 
In b48 Clicking on the frame ( step 8) does not get the dialog in front of the frame.
In b83 (the build which i had )clicking on the frame(step 8) gets the dialog in front of the frame.

As this scenario works fine in b40 , but dn't work in b48 & b83 to b87 .

Comments
EVALUATION First, the test attached is not completely correct - see evaluation for 6438985. This leads to frame not to be a parent of dialog. However, this mistake in the test reveals another problem. According to modality specification, no blocked window may be located on top of its blocker dialog, regardless whether this frame is a parent of the dialog or not. As the frame in the test is above the modal dialog right after it has been restored, this should be considered as a bug. I tried the test with Mustang-b42 and found no problems. Then I found, that in b43 some lines were removed from awt_Component.cpp by the fix for 6271871, and that led to this bug to appear. The fix for 6271871 is correct and shouldn't be reverted, and this bug should be fixed in some another way.
15-06-2006