JDK-6742975 : PIT : Security warning icon is missing if frame is minimized & restoring to normal state
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6u10
  • Priority: P1
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2008-08-29
  • Updated: 2011-01-19
  • Resolved: 2008-09-24
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
6u10 b33Fixed
Related Reports
Relates :  
Description
I am launching a frame using -Djava.security.manager. When the frame is visible, i can see the new java security icon is seen on the top right of the frame. I am minimizing & restoring the frame to its normal state. When the frame is brought to normal state. I can see the java security icon is missing. But the border of the frame gets flashing. Java security is the only way to indicate the security banner & its missing.  This was working fine in jdk6u10 b29 & b30, but its missing from this 6u11 b01. Hence its a regression. 
This may be regression of http://monaco.sfbay/detail.jsf?cr=6732583 or http://monaco.sfbay/detail.jsf?cr=6740941

I have attached the screen shot of the same. I tested this on winxp & windows vista .

Step to reproduce:-
-------------------
1) Run the attached testcase using -Djava.security.manager
 When the frame is visible. Observe that java security icon is seen & border of the frame get flashing.
2) Click on the minimize button. 
3) Restore the frame. Observe that java security icon is missing. If you see the same then the bug is reproduced.

Comments
EVALUATION Additional investigation shows that the fix for 6732051 needs to be just partially rolled back. The left part does not introduce any problem, but makes the problem described in 6732051 less intrusive: it disables the flashy border of the popup window when it gets hidden. See the suggested fix for details.
16-09-2008

SUGGESTED FIX --- old/src/windows/native/sun/windows/awt_Window.cpp 2008-09-16 17:15:09.000000000 +0400 +++ new/src/windows/native/sun/windows/awt_Window.cpp 2008-09-16 17:15:09.000000000 +0400 @@ -645,17 +645,6 @@ PaintWarningWindow(hwnd); return 0; - case WM_SHOWWINDOW: - { - //Fixed 6732051: Security warning icon is seen even after the popup menu is closed - UINT status = (UINT)lParam; - - if (status == SW_PARENTOPENING) { - return 0; - } - } - break; - case WM_MOUSEACTIVATE: { // Retrive the owner of the warning window.
16-09-2008

EVALUATION To keep owned windows (in)visible when their owner is minimized/restored, MS Windows uses the WM_SHOWWINDOW SW_PARENTOPENING/SW_PARENTCLOSING messages. The fix for 4842599 intentionally disables this mechanism for popup windows since we really don't want the popups to reappear when the Java frame gets restored. And this indeed is okay. To fix 6732051 we decided to use the same practice because the security warning is also an owned window - just like the popup windows are. And this works well when handling the Win+D situation (see the Description of 6732051). However, the icon actually *should* appear after restoring the Java window if the Java window gets visible. So, the fix for 6732051 is considered incorrect. The 6732051 should be marked as Fix Failed, its fix should be rolled back (should be a piece of cake - see Comments for details). This will allow closing this P1 CR as 'Not Reproducible', however we'll have the P2 6732051 reopened. It seems that 6732051 may be considered P3, and hence it is not a stopper for 6u10.
15-09-2008

EVALUATION This is a regression of 6732051. Commenting out the return statement in the WM_SHOWWINDOW message handler of the WarningWindowProc() function restores the correct behavior. However, this will reintroduce the 6732051. Needs additional investigation.
29-08-2008