src/share/classes/java/awt/DefaultKeyboardFocusManager.java

Print this page

        

*** 283,299 **** return false; } TimedWindowEvent we = (TimedWindowEvent)e; long time = we.getWhen(); synchronized (this) { ! for (KeyEvent ke: enqueuedKeyEvents) { ! if (time >= ke.getWhen()) { SunToolkit.postEvent(AppContext.getAppContext(), new SequencedEvent(e)); return true; } } } return false; } /** * This method is called by the AWT event dispatcher requesting that the --- 283,306 ---- return false; } TimedWindowEvent we = (TimedWindowEvent)e; long time = we.getWhen(); synchronized (this) { ! KeyEvent ke = enqueuedKeyEvents.isEmpty() ? null : enqueuedKeyEvents.getFirst(); ! if (ke != null && time >= ke.getWhen()) { ! TypeAheadMarker marker = typeAheadMarkers.getFirst(); ! if (marker != null) { ! Window toplevel = marker.untilFocused.getContainingWindow(); ! // Check that the component awaiting focus belongs to ! // the current focused window. See 8015454. ! if (toplevel != null && toplevel.isFocused()) { SunToolkit.postEvent(AppContext.getAppContext(), new SequencedEvent(e)); return true; } } } + } return false; } /** * This method is called by the AWT event dispatcher requesting that the