src/share/classes/sun/awt/KeyboardFocusManagerPeerImpl.java

Print this page

        

*** 55,66 **** @Override public void clearGlobalFocusOwner(Window activeWindow) { if (activeWindow != null) { Component focusOwner = activeWindow.getFocusOwner(); ! if (focusLog.isLoggable(PlatformLogger.FINE)) focusLog.fine("Clearing global focus owner " + focusOwner); if (focusOwner != null) { FocusEvent fl = new CausedFocusEvent(focusOwner, FocusEvent.FOCUS_LOST, false, null, CausedFocusEvent.Cause.CLEAR_GLOBAL_FOCUS_OWNER); SunToolkit.postPriorityEvent(fl); } --- 55,67 ---- @Override public void clearGlobalFocusOwner(Window activeWindow) { if (activeWindow != null) { Component focusOwner = activeWindow.getFocusOwner(); ! if (focusLog.isLoggable(PlatformLogger.FINE)) { focusLog.fine("Clearing global focus owner " + focusOwner); + } if (focusOwner != null) { FocusEvent fl = new CausedFocusEvent(focusOwner, FocusEvent.FOCUS_LOST, false, null, CausedFocusEvent.Cause.CLEAR_GLOBAL_FOCUS_OWNER); SunToolkit.postPriorityEvent(fl); }
*** 124,143 **** } if (currentOwner != null) { FocusEvent fl = new CausedFocusEvent(currentOwner, FocusEvent.FOCUS_LOST, false, lightweightChild, cause); ! if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer("Posting focus event: " + fl); SunToolkit.postEvent(SunToolkit.targetToAppContext(currentOwner), fl); } FocusEvent fg = new CausedFocusEvent(lightweightChild, FocusEvent.FOCUS_GAINED, false, currentOwner, cause); ! if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer("Posting focus event: " + fg); SunToolkit.postEvent(SunToolkit.targetToAppContext(lightweightChild), fg); return true; } // WARNING: Don't call it on the Toolkit thread. --- 125,146 ---- } if (currentOwner != null) { FocusEvent fl = new CausedFocusEvent(currentOwner, FocusEvent.FOCUS_LOST, false, lightweightChild, cause); ! if (focusLog.isLoggable(PlatformLogger.FINER)) { focusLog.finer("Posting focus event: " + fl); + } SunToolkit.postEvent(SunToolkit.targetToAppContext(currentOwner), fl); } FocusEvent fg = new CausedFocusEvent(lightweightChild, FocusEvent.FOCUS_GAINED, false, currentOwner, cause); ! if (focusLog.isLoggable(PlatformLogger.FINER)) { focusLog.finer("Posting focus event: " + fg); + } SunToolkit.postEvent(SunToolkit.targetToAppContext(lightweightChild), fg); return true; } // WARNING: Don't call it on the Toolkit thread.