src/solaris/classes/sun/awt/X11/XKeyboardFocusManagerPeer.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -24,13 +24,15 @@
*/
package sun.awt.X11;
import java.awt.Component;
import java.awt.Window;
-import sun.util.logging.PlatformLogger;
+
+import sun.awt.AWTAccessor;
import sun.awt.CausedFocusEvent;
import sun.awt.KeyboardFocusManagerPeerImpl;
+import sun.util.logging.PlatformLogger;
public class XKeyboardFocusManagerPeer extends KeyboardFocusManagerPeerImpl {
private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.X11.focus.XKeyboardFocusManagerPeer");
private static final XKeyboardFocusManagerPeer inst = new XKeyboardFocusManagerPeer();
@@ -66,17 +68,17 @@
XWindowPeer from = null, to = null;
synchronized(this) {
if (currentFocusedWindow != null) {
- from = (XWindowPeer)currentFocusedWindow.getPeer();
+ from = (XWindowPeer)AWTAccessor.getComponentAccessor().getPeer(currentFocusedWindow);
}
currentFocusedWindow = win;
if (currentFocusedWindow != null) {
- to = (XWindowPeer)currentFocusedWindow.getPeer();
+ to = (XWindowPeer)AWTAccessor.getComponentAccessor().getPeer(currentFocusedWindow);
}
}
if (from != null) {
from.updateSecurityWarningVisibility();