diff -r fc0bfa7d9d95 -r 2f3ad6aa2ac5 jdk/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java --- a/jdk/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java Mon Nov 18 19:22:29 2013 +0400 +++ b/jdk/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java Mon Nov 18 23:24:27 2013 +0400 @@ -740,37 +740,7 @@ // Bounds of the window Rectangle targetBounds = AWTAccessor.getComponentAccessor().getBounds((Component)target); - Point newLocation = targetBounds.getLocation(); - if (xe.get_send_event() || runningWM == XWM.NO_WM || XWM.isNonReparentingWM()) { - // Location, Client size + insets - newLocation = new Point(xe.get_x() - currentInsets.left, xe.get_y() - currentInsets.top); - } else { - // ICCCM 4.1.5 states that a real ConfigureNotify will be sent when - // a window is resized but the client can not tell if the window was - // moved or not. The client should consider the position as unkown - // and use TranslateCoordinates to find the actual position. - // - // TODO this should be the default for every case. - switch (XWM.getWMID()) { - case XWM.CDE_WM: - case XWM.MOTIF_WM: - case XWM.METACITY_WM: - case XWM.MUTTER_WM: - case XWM.SAWFISH_WM: - { - Point xlocation = queryXLocation(); - if (log.isLoggable(PlatformLogger.Level.FINE)) { - log.fine("New X location: {0}", xlocation); - } - if (xlocation != null) { - newLocation = xlocation; - } - break; - } - default: - break; - } - } + Point newLocation = getNewLocation(xe, currentInsets.left, currentInsets.top); WindowDimensions newDimensions = new WindowDimensions(newLocation, @@ -1261,12 +1231,4 @@ } super.handleWindowFocusOut(oppositeWindow, serial); } - - private Point queryXLocation() - { - return XlibUtil.translateCoordinates( - getContentWindow(), - XlibWrapper.RootWindow(XToolkit.getDisplay(), getScreenNumber()), - new Point(0, 0)); - } }