< prev index next >

src/java.desktop/unix/classes/sun/awt/X11/XLightweightFramePeer.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -27,14 +27,15 @@
 
 import java.awt.Graphics;
 import java.awt.dnd.DropTarget;
 
 import sun.awt.LightweightFrame;
+import sun.awt.OverrideNativeWindowHandle;
 import sun.swing.JLightweightFrame;
 import sun.swing.SwingAccessor;
 
-public class XLightweightFramePeer extends XFramePeer {
+public class XLightweightFramePeer extends XFramePeer implements OverrideNativeWindowHandle {
 
     XLightweightFramePeer(LightweightFrame target) {
         super(target);
     }
 

@@ -78,6 +79,17 @@
 
     @Override
     public void removeDropTarget(DropTarget dt) {
         getLwTarget().removeDropTarget(dt);
     }
+
+    private long overridenWindowHandle = 0L;
+
+    @Override
+    public void overrideWindowHandle(long handle) {
+        overridenWindowHandle = handle;
+    }
+
+    public long getOverridenWindowHandle() {
+        return overridenWindowHandle;
+    }
 }
< prev index next >