JDK-6825342 : Security warning may change Z-order of top-level
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: windows
  • CPU: x86
  • Submitted: 2009-04-02
  • 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 6 JDK 7
6u14-revFixed 7 b57Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
Please use the testcase attached to the CR 6770457 to reproduce the problem

The steps to reproduce the bug are

- there are two windows: the browser window and the"W2" dialog
- the browser window is on the top and the "W2" dialog is behind the browser window
- the browser window partially covers the "W2" dialog so that the user can highlight tooltip for button on the "W2" dialog / *button*
- The user moves the mouse continuously and quickly between the two windows - highlighting a tooltip in each window as they rotate.
- After many iterations (even 20-30) the W2 window will appear in front of the browser window but the title Bar of the W2 window
   will remain inactive (grey) - the browser window goes to back but still has active window title bar.

The problem is easily reproducible on Windows 2K, latest 6u14 build

Comments
EVALUATION This is a timing issue between the heavyweight tooltips and the security warning. It seems that on Windows 2000 the tooltip window may appear either above or below the security warning icon. Depending on the case the bug is sometimes reproduced. Looks like on Windows XP and higher the window always gets inserted in the correct position in the z-order, thus not causing the SetWindowPos invoked on the security warning to perform any actions.
07-04-2009

SUGGESTED FIX ------- awt_Window.cpp ------- *** /tmp/sccs.qiEVJC 2009-03-31 17:52:29.000000000 +0400 --- awt_Window.cpp 2009-03-31 17:51:52.000000000 +0400 *************** *** 321,327 **** ::SetWindowPos(warningWindow, HWND_NOTOPMOST, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, ! SWP_ASYNCWINDOWPOS | SWP_NOACTIVATE | SWP_NOZORDER ); } --- 321,327 ---- ::SetWindowPos(warningWindow, HWND_NOTOPMOST, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, ! SWP_ASYNCWINDOWPOS | SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOOWNERZORDER ); } *************** *** 801,807 **** if (securityAnimationKind == akShow) { ::SetWindowPos(warningWindow, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE | ! SWP_SHOWWINDOW); load_user_procs(); if (fn_set_layered_window_attributes) { --- 801,807 ---- if (securityAnimationKind == akShow) { ::SetWindowPos(warningWindow, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE | ! SWP_SHOWWINDOW | SWP_NOOWNERZORDER); load_user_procs(); if (fn_set_layered_window_attributes) { *************** *** 830,836 **** case akPreHide: ::SetWindowPos(warningWindow, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE | ! SWP_HIDEWINDOW); break; case akShow: RepaintWarningWindow(); --- 830,836 ---- case akPreHide: ::SetWindowPos(warningWindow, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE | ! SWP_HIDEWINDOW | SWP_NOOWNERZORDER); break; case akShow: RepaintWarningWindow();
02-04-2009

EVALUATION Need to use SWP_NOOWNERZORDER flag for warning windows.
02-04-2009