JDK-6538510 : Blocking dialog goes behind the blocked frame when using 'show desktop', win32
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2007-03-24
  • Updated: 2011-03-07
  • Resolved: 2011-03-07
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 7
7 b14Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
I am showing a frame with a button. On clicking the button, a JOptionPane message dialog with a null parent. It is an application modal dialog by default and hence blocks the frame. When clicking the frame, the JOptionPane's title flickers. Once both the windows are shown, I am pressing 'Windows key' + 'D' to show the desktop. Both the windows are minimized. I am pressing those keys again to make the windows appear on the screen. When I repeat this a few times, the frame comes on top of the message dialog. 

This is reproducible only on win32, since JDK6-b40. Not reproducible on JDK6-b30 and JDK1.5.0-FCS. Hence a regression introduced by modality changes. Works fine on SolSparc10.

To reproduce, run the attached test.
1. Frame will be shown. Move the frame to the center of the screen.
2. Press 'Windows'+'D'. Everything minimizes. 
3. Press 'Windows'+'D' again. Windows appear.
4. Repeat this a few times and you would see frame appearing above the dialog.

Comments
EVALUATION This problem is fixed together with 6494032.
13-04-2007

EVALUATION This is not a regression, see the evaluation for 6438993 and 6271871. When modality fix was integrated to b38, the following lines were added to WM_WINDOWPOSCHANGED handler: case WM_WINDOWPOSCHANGED: { HWND blocker = AwtWindow::GetModalBlocker(GetHWnd()); if (::IsWindow(blocker)) { ::BringWindowToTop(blocker); } .... However, they caused a serious problem 6271871 and were removed. Initial problem is that Win32 hides and restores all the windows when 'Show Desktop' button is pressed in a random order. We need to get our code ready for this in another way than handling WM_WINDOWPOSCHANGED message.
29-03-2007