From bbad610f8e642be113f5c34ff16538dc29d4eea9 Mon Sep 17 00:00:00 2001 From: Anton Tarasov Date: Tue, 29 Oct 2013 16:35:20 +0400 Subject: [PATCH] 8027157: [SwingNode] needs explicit expose for JWindow Reviewed-by: art, anthony --- .../windows/classes/sun/awt/windows/WComponentPeer.java | 4 ++++ .../classes/sun/awt/windows/WLightweightFramePeer.java | 4 ++++ jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java | 7 +++++++ 3 files changed, 15 insertions(+) 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