From f968da97a5a5c68c28ad29d13fdfbe3a4adf5ef7 Mon Sep 17 00:00:00 2001 From: Dmitry Cherepanov Date: Tue, 25 Apr 2023 06:56:32 +0000 Subject: [PATCH] 8305352: updateIconImages may lead to deadlock after JDK-8276849 Reviewed-by: aivanov, serb --- .../windows/classes/sun/awt/windows/WWindowPeer.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java b/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java index 1eec7180d4e..7b82229c02c 100644 --- a/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java +++ b/src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java @@ -600,7 +600,9 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer, newDev.addDisplayChangedListener(this); } - updateIconImages(); + if (((Window)target).isVisible()) { + updateIconImages(); + } AWTAccessor.getComponentAccessor(). setGraphicsConfiguration((Component)target, winGraphicsConfig);