提交 e4e8dd27 编写于 作者: A anthony

6825342: Security warning may change Z-order of top-level

Summary: Added the SWP_NOOWNERZORDER flag when calling ::SetWindowPos()
Reviewed-by: art, dcherepanov
上级 4f5ee193
...@@ -369,7 +369,8 @@ void AwtWindow::RepositionSecurityWarning(JNIEnv *env) ...@@ -369,7 +369,8 @@ void AwtWindow::RepositionSecurityWarning(JNIEnv *env)
::SetWindowPos(warningWindow, HWND_NOTOPMOST, ::SetWindowPos(warningWindow, HWND_NOTOPMOST,
rect.left, rect.top, rect.left, rect.top,
rect.right - rect.left, rect.bottom - 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 @@ void AwtWindow::StartSecurityAnimation(AnimationKind kind) ...@@ -854,7 +855,7 @@ void AwtWindow::StartSecurityAnimation(AnimationKind kind)
if (securityAnimationKind == akShow) { if (securityAnimationKind == akShow) {
::SetWindowPos(warningWindow, HWND_NOTOPMOST, 0, 0, 0, 0, ::SetWindowPos(warningWindow, HWND_NOTOPMOST, 0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE |
SWP_SHOWWINDOW); SWP_SHOWWINDOW | SWP_NOOWNERZORDER);
::SetLayeredWindowAttributes(warningWindow, RGB(0, 0, 0), ::SetLayeredWindowAttributes(warningWindow, RGB(0, 0, 0),
0xFF, LWA_ALPHA); 0xFF, LWA_ALPHA);
...@@ -880,7 +881,7 @@ void AwtWindow::StopSecurityAnimation() ...@@ -880,7 +881,7 @@ void AwtWindow::StopSecurityAnimation()
case akPreHide: case akPreHide:
::SetWindowPos(warningWindow, HWND_NOTOPMOST, 0, 0, 0, 0, ::SetWindowPos(warningWindow, HWND_NOTOPMOST, 0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOMOVE |
SWP_HIDEWINDOW); SWP_HIDEWINDOW | SWP_NOOWNERZORDER);
break; break;
case akShow: case akShow:
RepaintWarningWindow(); RepaintWarningWindow();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册