diff --git a/jdk/src/windows/classes/sun/awt/windows/WComponentPeer.java b/jdk/src/windows/classes/sun/awt/windows/WComponentPeer.java index cb13413fc08..d4c4f702dc5 100644 --- a/jdk/src/windows/classes/sun/awt/windows/WComponentPeer.java +++ b/jdk/src/windows/classes/sun/awt/windows/WComponentPeer.java @@ -1108,4 +1108,8 @@ public abstract class WComponentPeer extends WObjectPeer } private native void setZOrder(long above); + + public boolean isLightweightFramePeer() { + return false; + } } diff --git a/jdk/src/windows/classes/sun/awt/windows/WLightweightFramePeer.java b/jdk/src/windows/classes/sun/awt/windows/WLightweightFramePeer.java index ae5afdc56e7..28f009a4c02 100644 --- a/jdk/src/windows/classes/sun/awt/windows/WLightweightFramePeer.java +++ b/jdk/src/windows/classes/sun/awt/windows/WLightweightFramePeer.java @@ -90,4 +90,8 @@ public class WLightweightFramePeer extends WFramePeer { public void updateCursorImmediately() { SwingAccessor.getJLightweightFrameAccessor().updateCursor((JLightweightFrame)getLwTarget()); } + + public boolean isLightweightFramePeer() { + return true; + } } diff --git a/jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java b/jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java index 2087e1663dc..16ed261aa82 100644 --- a/jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java +++ b/jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java @@ -252,6 +252,13 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer, updateWindow(true); } } + + // See https://javafx-jira.kenai.com/browse/RT-32570 + WComponentPeer owner = getNativeParent(); + if (owner != null && owner.isLightweightFramePeer()) { + Rectangle b = getBounds(); + handleExpose(0, 0, b.width, b.height); + } } // Synchronize the insets members (here & in helper) with actual window