src/macosx/classes/sun/lwawt/LWWindowPeer.java
Print this page
@@ -45,11 +45,12 @@
{
public static enum PeerType {
SIMPLEWINDOW,
FRAME,
DIALOG,
- EMBEDDEDFRAME
+ EMBEDDEDFRAME,
+ VIEWEMBEDDEDFRAME
}
private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.lwawt.focus.LWWindowPeer");
private PlatformWindow platformWindow;
@@ -106,22 +107,25 @@
private static final Color nonOpaqueBackground = new Color(0, 0, 0, 0);
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;
@@ -273,10 +277,15 @@
return platformWindow.transformGraphics(new SunGraphics2D(getSurfaceData(), fg, bg, f));
}
@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
// no need to add insets since Window's notion of width and height includes insets.
op &= ~SET_CLIENT_SIZE;
@@ -1208,10 +1217,14 @@
private boolean isGrabbing() {
return this == grabbingWindow;
}
+ public PeerType getPeerType() {
+ return peerType;
+ }
+
@Override
public String toString() {
return super.toString() + " [target is " + getTarget() + "]";
}
}