8027157: [SwingNode] needs explicit expose for JWindow
authorant
Tue, 29 Oct 2013 16:35:20 +0400
changeset 21277 bd380b80f9ea
parent 21276 f1438e2ce393
child 21278 ef8a3a2a72f2
8027157: [SwingNode] needs explicit expose for JWindow Reviewed-by: art, anthony
jdk/src/windows/classes/sun/awt/windows/WComponentPeer.java
jdk/src/windows/classes/sun/awt/windows/WLightweightFramePeer.java
jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java
--- a/jdk/src/windows/classes/sun/awt/windows/WComponentPeer.java	Fri Oct 25 10:39:13 2013 -0700
+++ b/jdk/src/windows/classes/sun/awt/windows/WComponentPeer.java	Tue Oct 29 16:35:20 2013 +0400
@@ -1108,4 +1108,8 @@
     }
 
     private native void setZOrder(long above);
+
+    public boolean isLightweightFramePeer() {
+        return false;
+    }
 }
--- a/jdk/src/windows/classes/sun/awt/windows/WLightweightFramePeer.java	Fri Oct 25 10:39:13 2013 -0700
+++ b/jdk/src/windows/classes/sun/awt/windows/WLightweightFramePeer.java	Tue Oct 29 16:35:20 2013 +0400
@@ -90,4 +90,8 @@
     public void updateCursorImmediately() {
         SwingAccessor.getJLightweightFrameAccessor().updateCursor((JLightweightFrame)getLwTarget());
     }
+
+    public boolean isLightweightFramePeer() {
+        return true;
+    }
 }
--- a/jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java	Fri Oct 25 10:39:13 2013 -0700
+++ b/jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java	Tue Oct 29 16:35:20 2013 +0400
@@ -252,6 +252,13 @@
                 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