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

Print this page

        

*** 42,51 **** --- 42,52 ---- import java.util.concurrent.Callable; import java.net.MalformedURLException; import sun.awt.*; import sun.awt.datatransfer.DataTransferer; + import sun.awt.util.ThreadGroupUtils; import sun.java2d.opengl.OGLRenderQueue; import sun.lwawt.*; import sun.lwawt.LWWindowPeer.PeerType; import sun.security.action.GetBooleanAction;
*** 68,78 **** // the easy way and just support up to 5 mouse buttons, // like Windows. private static final int BUTTONS = 5; private static native void initIDs(); ! private static CInputMethodDescriptor sInputMethodDescriptor; static { System.err.flush(); --- 69,79 ---- // the easy way and just support up to 5 mouse buttons, // like Windows. private static final int BUTTONS = 5; private static native void initIDs(); ! private static native void initAppkit(ThreadGroup appKitThreadGroup, boolean headless); private static CInputMethodDescriptor sInputMethodDescriptor; static { System.err.flush();
*** 117,126 **** --- 118,128 ---- public LWCToolkit() { areExtraMouseButtonsEnabled = Boolean.parseBoolean(System.getProperty("sun.awt.enableExtraMouseButtons", "true")); //set system property if not yet assigned System.setProperty("sun.awt.enableExtraMouseButtons", ""+areExtraMouseButtonsEnabled); + initAppkit(ThreadGroupUtils.getRootThreadGroup(), GraphicsEnvironment.isHeadless()); } /* * System colors with default initial values, overwritten by toolkit if system values differ and are available. */
*** 164,174 **** } // This is only called from native code. static void systemColorsChanged() { EventQueue.invokeLater(() -> { ! AccessController.doPrivileged ((PrivilegedAction<Object>) () -> { AWTAccessor.getSystemColorAccessor().updateSystemColors(); return null; }); }); } --- 166,176 ---- } // This is only called from native code. static void systemColorsChanged() { EventQueue.invokeLater(() -> { ! AccessController.doPrivileged( (PrivilegedAction<Object>) () -> { AWTAccessor.getSystemColorAccessor().updateSystemColors(); return null; }); }); }