--- old/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java 2012-12-04 16:21:04.000000000 +0400 +++ new/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java 2012-12-04 16:21:04.000000000 +0400 @@ -64,8 +64,6 @@ private static native void nativeDispose(long nsWindowPtr); private static native CPlatformWindow nativeGetTopmostPlatformWindowUnderMouse(); - private static native int nativeGetNSWindowDisplayID(long nsWindowPtr); - // Loger to report issues happened during execution but that do not affect functionality private static final PlatformLogger logger = PlatformLogger.getLogger("sun.lwawt.macosx.CPlatformWindow"); private static final PlatformLogger focusLogger = PlatformLogger.getLogger("sun.lwawt.macosx.focus.CPlatformWindow"); @@ -136,7 +134,7 @@ static final int SHOULD_BECOME_KEY = 1 << 12; static final int SHOULD_BECOME_MAIN = 1 << 13; static final int MODAL_EXCLUDED = 1 << 16; - + static final int _CALLBACK_PROP_BITMASK = SHOULD_BECOME_KEY | SHOULD_BECOME_MAIN | MODAL_EXCLUDED; static int SET(final int bits, final int mask, final boolean value) { @@ -211,9 +209,8 @@ private CPlatformResponder responder; private volatile boolean zoomed = false; // from native perspective - public CPlatformWindow(final PeerType peerType) { + public CPlatformWindow() { super(0, true); - assert (peerType == PeerType.SIMPLEWINDOW || peerType == PeerType.DIALOG || peerType == PeerType.FRAME); } /* @@ -429,16 +426,7 @@ @Override public GraphicsDevice getGraphicsDevice() { - GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); - CGraphicsEnvironment cge = (CGraphicsEnvironment)ge; - int displayID = nativeGetNSWindowDisplayID(getNSWindowPtr()); - GraphicsDevice gd = cge.getScreenDevice(displayID); - if (gd == null) { - // this could possibly happen during device removal - // use the default screen device in this case - gd = ge.getDefaultScreenDevice(); - } - return gd; + return contentView.getGraphicsDevice(); } @Override // PlatformWindow @@ -635,7 +623,7 @@ } return nsWindowPtr; } - + public SurfaceData getSurfaceData() { return contentView.getSurfaceData(); } @@ -833,6 +821,11 @@ return peer; } + @Override + public boolean isUnderMouse() { + return contentView.isUnderMouse(); + } + public CPlatformView getContentView() { return contentView; }