diff --git a/src/windows/native/sun/windows/awt_Toolkit.cpp b/src/windows/native/sun/windows/awt_Toolkit.cpp index b612bd1bf16f14a8d328967dc853ebea952867ff..9482f358fd1ea8a6b15c426aa48d0fbf53fd1e95 100644 --- a/src/windows/native/sun/windows/awt_Toolkit.cpp +++ b/src/windows/native/sun/windows/awt_Toolkit.cpp @@ -1518,6 +1518,7 @@ HICON AwtToolkit::GetAwtIconSm() return defaultIconSm; } +// The icon at index 0 must be gray. See AwtWindow::GetSecurityWarningIcon() HICON AwtToolkit::GetSecurityWarningIcon(UINT index, UINT w, UINT h) { //Note: should not exceed 10 because of the current implementation. diff --git a/src/windows/native/sun/windows/awt_Window.cpp b/src/windows/native/sun/windows/awt_Window.cpp index c03420d35222a2b21dd94d20368402f5d13c13a6..1819115859b25237f9ca291e04c0e09487d96b68 100644 --- a/src/windows/native/sun/windows/awt_Window.cpp +++ b/src/windows/native/sun/windows/awt_Window.cpp @@ -652,7 +652,10 @@ void AwtWindow::UnregisterWarningWindowClass() HICON AwtWindow::GetSecurityWarningIcon() { - HICON ico = AwtToolkit::GetInstance().GetSecurityWarningIcon(securityWarningAnimationStage, + // It is assumed that the icon at index 0 is gray + const UINT index = securityAnimationKind == akShow ? + securityWarningAnimationStage : 0; + HICON ico = AwtToolkit::GetInstance().GetSecurityWarningIcon(index, warningWindowWidth, warningWindowHeight); return ico; }