changeset 1205:98ddbb3840a4

6825342: Security warning may change Z-order of top-level Summary: Added the SWP_NOOWNERZORDER flag when calling ::SetWindowPos() Reviewed-by: art, dcherepanov
author anthony
date Tue, 14 Apr 2009 14:17:31 +0400
parents 8dd1c3eb1288
children 6f4446ca5499
files src/windows/native/sun/windows/awt_Window.cpp
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/windows/native/sun/windows/awt_Window.cpp	Mon Apr 13 21:42:44 2009 +0400
+++ b/src/windows/native/sun/windows/awt_Window.cpp	Tue Apr 14 14:17:31 2009 +0400
@@ -369,7 +369,8 @@
     ::SetWindowPos(warningWindow, HWND_NOTOPMOST,
             rect.left, rect.top,
             rect.right - rect.left, rect.bottom - rect.top,
-            SWP_ASYNCWINDOWPOS | SWP_NOACTIVATE | SWP_NOZORDER
+            SWP_ASYNCWINDOWPOS | SWP_NOACTIVATE | SWP_NOZORDER |
+            SWP_NOOWNERZORDER
             );
 }
 
@@ -854,7 +855,7 @@
     if (securityAnimationKind == akShow) {
         ::SetWindowPos(warningWindow, HWND_NOTOPMOST, 0, 0, 0, 0,
                 SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE |
-                SWP_SHOWWINDOW);
+                SWP_SHOWWINDOW | SWP_NOOWNERZORDER);
 
         ::SetLayeredWindowAttributes(warningWindow, RGB(0, 0, 0),
                 0xFF, LWA_ALPHA);
@@ -880,7 +881,7 @@
         case akPreHide:
             ::SetWindowPos(warningWindow, HWND_NOTOPMOST, 0, 0, 0, 0,
                     SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE |
-                    SWP_HIDEWINDOW);
+                    SWP_HIDEWINDOW | SWP_NOOWNERZORDER);
             break;
         case akShow:
             RepaintWarningWindow();