--- old/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java 2016-02-10 09:55:02.545567300 +0300 +++ new/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java 2016-02-10 09:55:02.013198200 +0300 @@ -1008,13 +1008,10 @@ // if ( Check if it's a resize, a move, or a stacking order change ) // { Rectangle bounds = getBounds(); - final ComponentAccessor acc = AWTAccessor.getComponentAccessor(); if (!bounds.getSize().equals(oldBounds.getSize())) { - acc.setSize(target, bounds.width, bounds.height); postEventToEventQueue(new ComponentEvent(getEventSource(), ComponentEvent.COMPONENT_RESIZED)); } if (!bounds.getLocation().equals(oldBounds.getLocation())) { - acc.setLocation(target, bounds.x, bounds.y); postEventToEventQueue(new ComponentEvent(getEventSource(), ComponentEvent.COMPONENT_MOVED)); } // } --- old/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java 2016-02-10 09:55:05.599156100 +0300 +++ new/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java 2016-02-10 09:55:05.056742300 +0300 @@ -803,23 +803,32 @@ */ @Override public void handleConfigureNotifyEvent(XEvent xev) { + assert (SunToolkit.isAWTLockHeldByCurrentThread()); XConfigureEvent xe = xev.get_xconfigure(); - /* - * Correct window location which could be wrong in some cases. - * See getNewLocation() for the details. - */ - Point newLocation = getNewLocation(xe, 0, 0); - xe.set_x(scaleUp(newLocation.x)); - xe.set_y(scaleUp(newLocation.y)); - checkIfOnNewScreen(new Rectangle(newLocation.x, - newLocation.y, - scaleDown(xe.get_width()), - scaleDown(xe.get_height()))); + if (insLog.isLoggable(PlatformLogger.Level.FINE)) { + insLog.fine(xe.toString()); + } + checkIfOnNewScreen(toGlobal(new Rectangle(scaleDown(xe.get_x()), + scaleDown(xe.get_y()), + scaleDown(xe.get_width()), + scaleDown(xe.get_height())))); + + Rectangle oldBounds = getBounds(); + + x = scaleDown(xe.get_x()); + y = scaleDown(xe.get_y()); + width = scaleDown(xe.get_width()); + height = scaleDown(xe.get_height()); + + if (!getBounds().getSize().equals(oldBounds.getSize())) { + AWTAccessor.getComponentAccessor().setSize(target, width, height); + postEvent(new ComponentEvent(target, ComponentEvent.COMPONENT_RESIZED)); + } + if (!getBounds().getLocation().equals(oldBounds.getLocation())) { + AWTAccessor.getComponentAccessor().setLocation(target, x, y); + postEvent(new ComponentEvent(target, ComponentEvent.COMPONENT_MOVED)); + } - // Don't call super until we've handled a screen change. Otherwise - // there could be a race condition in which a ComponentListener could - // see the old screen. - super.handleConfigureNotifyEvent(xev); repositionSecurityWarning(); }