--- old/src/macosx/classes/sun/lwawt/LWWindowPeer.java 2012-12-04 16:21:00.000000000 +0400 +++ new/src/macosx/classes/sun/lwawt/LWWindowPeer.java 2012-12-04 16:21:00.000000000 +0400 @@ -47,7 +47,8 @@ SIMPLEWINDOW, FRAME, DIALOG, - EMBEDDEDFRAME + EMBEDDEDFRAME, + VIEWEMBEDDEDFRAME } private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.lwawt.focus.LWWindowPeer"); @@ -108,19 +109,22 @@ private volatile boolean textured; + private final PeerType peerType; + /** * Current modal blocker or null. * * Synchronization: peerTreeLock. */ private LWWindowPeer blocker; - + public LWWindowPeer(Window target, PlatformComponent platformComponent, - PlatformWindow platformWindow) + PlatformWindow platformWindow, PeerType peerType) { super(target, platformComponent); this.platformWindow = platformWindow; - + this.peerType = peerType; + Window owner = target.getOwner(); LWWindowPeer ownerPeer = (owner != null) ? (LWWindowPeer)owner.getPeer() : null; PlatformWindow ownerDelegate = (ownerPeer != null) ? ownerPeer.getPlatformWindow() : null; @@ -275,6 +279,11 @@ @Override public void setBounds(int x, int y, int w, int h, int op) { + + if((op & NO_EMBEDDED_CHECK) == 0 && getPeerType() == PeerType.VIEWEMBEDDEDFRAME) { + return; + } + if ((op & SET_CLIENT_SIZE) != 0) { // SET_CLIENT_SIZE is only applicable to window peers, so handle it here // instead of pulling 'insets' field up to LWComponentPeer @@ -490,7 +499,7 @@ public Rectangle getBoundsPrivate() { throw new RuntimeException("not implemented"); } - + // ---- DIALOG PEER METHODS ---- // @Override @@ -1191,7 +1200,7 @@ public long getLayerPtr() { return getPlatformWindow().getLayerPtr(); } - + void grab() { if (grabbingWindow != null && !isGrabbing()) { grabbingWindow.ungrab(); @@ -1210,6 +1219,10 @@ return this == grabbingWindow; } + public PeerType getPeerType() { + return peerType; + } + @Override public String toString() { return super.toString() + " [target is " + getTarget() + "]";