--- old/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java 2015-07-21 12:24:38.846369600 +0300 +++ new/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java 2015-07-21 12:24:38.248967600 +0300 @@ -544,6 +544,7 @@ public void run(boolean loop) { + Unsafe unsafe = Unsafe.getUnsafe(); XEvent ev = new XEvent(); while(true) { // Fix for 6829923: we should gracefully handle toolkit thread interruption @@ -598,7 +599,8 @@ // Check if input method consumes the event long w = 0; - if (windowToXWindow(ev.get_xany().get_window()) != null) { + if (!unsafe.shouldBeInitialized(XKeyboardFocusManagerPeer.class) + && windowToXWindow(ev.get_xany().get_window()) != null) { Component owner = XKeyboardFocusManagerPeer.getInstance().getCurrentFocusOwner(); if (owner != null) {