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

Print this page

        

*** 62,73 **** private static native void nativeSetEnabled(long nsWindowPtr, boolean isEnabled); private static native void nativeSynthesizeMouseEnteredExitedEvents(); 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"); // for client properties --- 62,71 ----
*** 209,221 **** 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(final PeerType peerType) { super(0, true); - assert (peerType == PeerType.SIMPLEWINDOW || peerType == PeerType.DIALOG || peerType == PeerType.FRAME); } /* * Delegate initialization (create native window and all the * related resources). --- 207,218 ---- 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); } /* * Delegate initialization (create native window and all the * related resources).
*** 427,446 **** return new Point(nativeBounds.x, nativeBounds.y); } @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; } @Override // PlatformWindow public SurfaceData getScreenSurface() { // TODO: not implemented --- 424,434 ---- return new Point(nativeBounds.x, nativeBounds.y); } @Override public GraphicsDevice getGraphicsDevice() { ! return contentView.getGraphicsDevice(); } @Override // PlatformWindow public SurfaceData getScreenSurface() { // TODO: not implemented
*** 831,840 **** --- 819,833 ---- @Override public LWWindowPeer getPeer() { return peer; } + @Override + public boolean isUnderMouse() { + return contentView.isUnderMouse(); + } + public CPlatformView getContentView() { return contentView; } @Override