src/macosx/classes/sun/lwawt/LWWindowPeer.java
Print this page
*** 45,55 ****
{
public static enum PeerType {
SIMPLEWINDOW,
FRAME,
DIALOG,
! EMBEDDEDFRAME
}
private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.lwawt.focus.LWWindowPeer");
private PlatformWindow platformWindow;
--- 45,56 ----
{
public static enum PeerType {
SIMPLEWINDOW,
FRAME,
DIALOG,
! EMBEDDEDFRAME,
! VIEWEMBEDDEDFRAME
}
private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.lwawt.focus.LWWindowPeer");
private PlatformWindow platformWindow;
*** 106,127 ****
private static final Color nonOpaqueBackground = new Color(0, 0, 0, 0);
private volatile boolean textured;
/**
* Current modal blocker or null.
*
* Synchronization: peerTreeLock.
*/
private LWWindowPeer blocker;
public LWWindowPeer(Window target, PlatformComponent platformComponent,
! PlatformWindow platformWindow)
{
super(target, platformComponent);
this.platformWindow = platformWindow;
Window owner = target.getOwner();
LWWindowPeer ownerPeer = (owner != null) ? (LWWindowPeer)owner.getPeer() : null;
PlatformWindow ownerDelegate = (ownerPeer != null) ? ownerPeer.getPlatformWindow() : null;
--- 107,131 ----
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, 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,282 ****
--- 277,291 ----
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,1217 ****
--- 1217,1230 ----
private boolean isGrabbing() {
return this == grabbingWindow;
}
+ public PeerType getPeerType() {
+ return peerType;
+ }
+
@Override
public String toString() {
return super.toString() + " [target is " + getTarget() + "]";
}
}