jdk/src/solaris/classes/sun/awt/X11/XKeyboardFocusManagerPeer.java
changeset 3938 ef327bd847c0
parent 2472 b7aba00cabb6
child 5506 202f599c92aa
equal deleted inserted replaced
3934:487e1aa949c4 3938:ef327bd847c0
    34 import java.awt.peer.ComponentPeer;
    34 import java.awt.peer.ComponentPeer;
    35 
    35 
    36 import java.lang.reflect.InvocationTargetException;
    36 import java.lang.reflect.InvocationTargetException;
    37 import java.lang.reflect.Method;
    37 import java.lang.reflect.Method;
    38 
    38 
    39 import java.util.logging.Level;
    39 import sun.util.logging.PlatformLogger;
    40 import java.util.logging.Logger;
       
    41 
    40 
    42 import sun.awt.CausedFocusEvent;
    41 import sun.awt.CausedFocusEvent;
    43 import sun.awt.SunToolkit;
    42 import sun.awt.SunToolkit;
    44 import sun.awt.KeyboardFocusManagerPeerImpl;
    43 import sun.awt.KeyboardFocusManagerPeerImpl;
    45 
    44 
    46 public class XKeyboardFocusManagerPeer extends KeyboardFocusManagerPeerImpl {
    45 public class XKeyboardFocusManagerPeer extends KeyboardFocusManagerPeerImpl {
    47     private static final Logger focusLog = Logger.getLogger("sun.awt.X11.focus.XKeyboardFocusManagerPeer");
    46     private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.X11.focus.XKeyboardFocusManagerPeer");
    48 
    47 
    49     private static Object lock = new Object() {};
    48     private static Object lock = new Object() {};
    50     private static Component currentFocusOwner;
    49     private static Component currentFocusOwner;
    51     private static Window currentFocusedWindow;
    50     private static Window currentFocusedWindow;
    52 
    51 
    80             return currentFocusOwner;
    79             return currentFocusOwner;
    81         }
    80         }
    82     }
    81     }
    83 
    82 
    84     public static void setCurrentNativeFocusedWindow(Window win) {
    83     public static void setCurrentNativeFocusedWindow(Window win) {
    85         if (focusLog.isLoggable(Level.FINER)) focusLog.finer("Setting current native focused window " + win);
    84         if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer("Setting current native focused window " + win);
    86         XWindowPeer from = null, to = null;
    85         XWindowPeer from = null, to = null;
    87 
    86 
    88         synchronized(lock) {
    87         synchronized(lock) {
    89             if (currentFocusedWindow != null) {
    88             if (currentFocusedWindow != null) {
    90                 from = (XWindowPeer)currentFocusedWindow.getPeer();
    89                 from = (XWindowPeer)currentFocusedWindow.getPeer();