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

Print this page

        

*** 475,490 **** CWrapper.NSWindow.zoom(getNSWindowPtr()); } else { deliverZoom(true); this.normalBounds = peer.getBounds(); ! long screen = CWrapper.NSWindow.screen(getNSWindowPtr()); ! Rectangle toBounds = CWrapper.NSScreen.visibleFrame(screen).getBounds(); ! // Flip the y coordinate ! Rectangle frame = CWrapper.NSScreen.frame(screen).getBounds(); ! toBounds.y = frame.height - toBounds.y - toBounds.height; ! setBounds(toBounds.x, toBounds.y, toBounds.width, toBounds.height); } } private void unmaximize() { if (!isMaximized()) { --- 475,492 ---- CWrapper.NSWindow.zoom(getNSWindowPtr()); } else { deliverZoom(true); this.normalBounds = peer.getBounds(); ! ! GraphicsConfiguration config = getPeer().getGraphicsConfiguration(); ! Insets i = ((CGraphicsDevice)config.getDevice()).getScreenInsets(); ! Rectangle toBounds = config.getBounds(); ! setBounds(toBounds.x + i.left, ! toBounds.y + i.top, ! toBounds.width - i.left - i.right, ! toBounds.height - i.top - i.bottom); } } private void unmaximize() { if (!isMaximized()) {
*** 746,762 **** isFullScreenMode = true; contentView.enterFullScreenMode(); // the move/size notification from the underlying system comes // but it contains a bounds smaller than the whole screen // and therefore we need to create the synthetic notifications ! Rectangle screenBounds; ! final long screenPtr = CWrapper.NSWindow.screen(getNSWindowPtr()); ! try { ! screenBounds = CWrapper.NSScreen.frame(screenPtr).getBounds(); ! } finally { ! CWrapper.NSObject.release(screenPtr); ! } peer.notifyReshape(screenBounds.x, screenBounds.y, screenBounds.width, screenBounds.height); } @Override --- 748,758 ---- isFullScreenMode = true; contentView.enterFullScreenMode(); // the move/size notification from the underlying system comes // but it contains a bounds smaller than the whole screen // and therefore we need to create the synthetic notifications ! Rectangle screenBounds = getPeer().getGraphicsConfiguration().getBounds(); peer.notifyReshape(screenBounds.x, screenBounds.y, screenBounds.width, screenBounds.height); } @Override