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

Print this page

        

*** 63,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_AppKitThread(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"); --- 63,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");
*** 442,452 **** @Override public GraphicsDevice getGraphicsDevice() { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); CGraphicsEnvironment cge = (CGraphicsEnvironment)ge; ! int displayID = nativeGetNSWindowDisplayID_AppKitThread(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(); --- 442,452 ---- @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();