JDK-6288585 : PIT. Windows: Blocked Frame appears above modal dialog
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows
  • CPU: x86
  • Submitted: 2005-06-21
  • Updated: 2011-01-19
  • Resolved: 2005-07-23
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
6 b45Fixed
Related Reports
Relates :  
Description
A modal dialog with a hidden dialog as parent does not appear on top of new frames. This occurs with b43 PIT build only on Windows platform.

java -version
java version "1.6.0-awt.pit-int-jcg-win-03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-awt.pit-int-jcg-win-03-java2d_16_jun_2005_10_53-b00)
Java HotSpot(TM) Client VM (build 1.6.0-ea-b40, mixed mode)

I'm showing an application modal Dialog whose parent is a hidden dialog. On clicking a button on the dialog, I'm showing a frame. The frame is blocked by dialog, but it appears on top of the modal dialog. The modal dialog comes to top if the blocked frame is clicked.

To reproduce:
Run the attached test; click on the 'Click Me' button
###@###.### 2005-06-21 10:22:27 GMT

Comments
EVALUATION This is a regression, most likely caused by the fix for 6271871. To be more pricise, that fix is absolutely correct. It removes unnecessary code from WM_WINDOWPOSCHANGED handler. The side effect of the lines removed was placing a window below the blocker dialog, but in fact it should be done in another place, when a window is being blocked. ###@###.### 2005-07-01 13:00:10 GMT The same problem can be seen with some window managers on Solaris/Linux, for example, IceWM. It depends on the fact if the window manager tracks changes of WM_TRANSIENT_FOR hint for already visible windows or not and changes that window Z-position correspondingly. ###@###.### 2005-07-01 13:23:13 GMT
01-07-2005

SUGGESTED FIX --- awt_Window.cpp Fri Jul 1 16:38:42 2005 *************** *** 1586,1591 **** --- 1586,1592 ---- if (::IsWindow(windowHWnd) && ::IsWindow(blockerHWnd)) { AwtWindow::SetModalBlocker(windowHWnd, blockerHWnd); + ::BringWindowToTop(blockerHWnd); ::SetForegroundWindow(blockerHWnd); } *************** *** 1622,1627 **** --- 1623,1630 ---- if (::IsWindow(windowHWnd) && ::IsWindow(blockerHWnd)) { AwtWindow::SetModalBlocker(windowHWnd, blockerHWnd); + ::BringWindowToTop(blockerHWnd); + ::SetForegroundWindow(blockerHWnd); } ret: (the first chunk is _ModalDisable method, the second one is _ModalDisableByHWnd method) ###@###.### 2005-07-01 13:00:10 GMT
01-07-2005