src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java

Print this page

        

*** 208,218 **** protected CPlatformWindow owner; protected boolean visible = false; // visibility status from native perspective private boolean undecorated; // initialized in getInitialStyleBits() private Rectangle normalBounds = null; // not-null only for undecorated maximized windows private CPlatformResponder responder; - private volatile boolean zoomed = false; // from native perspective public CPlatformWindow() { super(0, true); } --- 208,217 ----
*** 229,239 **** responder = createPlatformResponder(); contentView = createContentView(); contentView.initialize(peer, responder); final long ownerPtr = owner != null ? owner.getNSWindowPtr() : 0L; ! final long nativeWindowPtr = nativeCreateNSWindow(contentView.getAWTView(), ownerPtr, styleBits, 0, 0, 0, 0); setPtr(nativeWindowPtr); if (target instanceof javax.swing.RootPaneContainer) { final javax.swing.JRootPane rootpane = ((javax.swing.RootPaneContainer)target).getRootPane(); if (rootpane != null) rootpane.addPropertyChangeListener("ancestor", new PropertyChangeListener() { --- 228,240 ---- responder = createPlatformResponder(); contentView = createContentView(); contentView.initialize(peer, responder); final long ownerPtr = owner != null ? owner.getNSWindowPtr() : 0L; ! Rectangle bounds = _peer.constrainBounds(_target.getBounds()); ! final long nativeWindowPtr = nativeCreateNSWindow(contentView.getAWTView(), ! ownerPtr, styleBits, bounds.x, bounds.y, bounds.width, bounds.height); setPtr(nativeWindowPtr); if (target instanceof javax.swing.RootPaneContainer) { final javax.swing.JRootPane rootpane = ((javax.swing.RootPaneContainer)target).getRootPane(); if (rootpane != null) rootpane.addPropertyChangeListener("ancestor", new PropertyChangeListener() {
*** 464,482 **** // assert CThreading.assertEventQueue(); nativeSetNSWindowBounds(getNSWindowPtr(), x, y, w, h); } private boolean isMaximized() { ! return undecorated ? this.normalBounds != null : zoomed; } private void maximize() { if (peer == null || isMaximized()) { return; } if (!undecorated) { - zoomed = true; CWrapper.NSWindow.zoom(getNSWindowPtr()); } else { deliverZoom(true); this.normalBounds = peer.getBounds(); --- 465,483 ---- // assert CThreading.assertEventQueue(); nativeSetNSWindowBounds(getNSWindowPtr(), x, y, w, h); } private boolean isMaximized() { ! return undecorated ? this.normalBounds != null ! : CWrapper.NSWindow.isZoomed(getNSWindowPtr()); } private void maximize() { if (peer == null || isMaximized()) { return; } if (!undecorated) { CWrapper.NSWindow.zoom(getNSWindowPtr()); } else { deliverZoom(true); this.normalBounds = peer.getBounds();
*** 494,504 **** private void unmaximize() { if (!isMaximized()) { return; } if (!undecorated) { - zoomed = false; CWrapper.NSWindow.zoom(getNSWindowPtr()); } else { deliverZoom(false); Rectangle toBounds = this.normalBounds; --- 495,504 ----