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

Print this page

        

*** 470,479 **** --- 470,480 ---- } @Override // PlatformWindow public void setBounds(int x, int y, int w, int h) { nativeSetNSWindowBounds(getNSWindowPtr(), x, y, w, h); + checkZoom(false); } private boolean isMaximized() { return undecorated ? this.normalBounds != null : CWrapper.NSWindow.isZoomed(getNSWindowPtr());
*** 948,958 **** responder.handleWindowFocusEvent(gained, oppositePeer); } protected void deliverMoveResizeEvent(int x, int y, int width, int height, boolean byUser) { ! checkZoom(); final Rectangle oldB = nativeBounds; nativeBounds = new Rectangle(x, y, width, height); if (peer != null) { peer.notifyReshape(x, y, width, height); --- 949,959 ---- responder.handleWindowFocusEvent(gained, oppositePeer); } protected void deliverMoveResizeEvent(int x, int y, int width, int height, boolean byUser) { ! checkZoom(true); final Rectangle oldB = nativeBounds; nativeBounds = new Rectangle(x, y, width, height); if (peer != null) { peer.notifyReshape(x, y, width, height);
*** 980,995 **** if (peer != null) { peer.notifyZoom(isZoomed); } } ! private void checkZoom() { ! if (target instanceof Frame && isVisible()) { ! Frame targetFrame = (Frame)target; ! if (targetFrame.getExtendedState() != Frame.MAXIMIZED_BOTH && isMaximized()) { deliverZoom(true); ! } else if (targetFrame.getExtendedState() == Frame.MAXIMIZED_BOTH && !isMaximized()) { deliverZoom(false); } } } --- 981,1002 ---- if (peer != null) { peer.notifyZoom(isZoomed); } } ! private void checkZoom(boolean mouseEvent) { ! ! if(mouseEvent && !isVisible()){ ! return; ! } ! ! if (target instanceof Frame) { ! Frame targetFrame = (Frame) target; ! int state = targetFrame.getExtendedState(); ! if (state != Frame.MAXIMIZED_BOTH && isMaximized()) { deliverZoom(true); ! } else if (mouseEvent && state == Frame.MAXIMIZED_BOTH && !isMaximized()) { deliverZoom(false); } } }