< prev index next >

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

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2018, 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

@@ -36,10 +36,11 @@
 import sun.awt.IconInfo;
 import sun.util.logging.PlatformLogger;
 
 import sun.awt.AWTAccessor;
 import sun.awt.SunToolkit;
+import sun.font.FontUtilities;
 
 abstract class XDecoratedPeer extends XWindowPeer {
     private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XDecoratedPeer");
     private static final PlatformLogger insLog = PlatformLogger.getLogger("sun.awt.X11.insets.XDecoratedPeer");
     private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.X11.focus.XDecoratedPeer");

@@ -806,10 +807,16 @@
         }
 
         updateChildrenSizes();
 
         Point newLocation = getNewLocation(xe, currentInsets.left, currentInsets.top);
+        if (XWM.isMotif()) {
+            if (!isFocusableWindow() && FontUtilities.isAIX) {
+                Rectangle targetBounds = AWTAccessor.getComponentAccessor().getBounds(target);
+                newLocation = targetBounds.getLocation();
+            }
+        }
         WindowDimensions newDimensions =
                 new WindowDimensions(newLocation,
                                      new Dimension(scaleDown(xe.get_width()),
                                                    scaleDown(xe.get_height())),
                                      copy(currentInsets), true);
< prev index next >