Beispiel #1
0
  public void handleWindowFocusOut(Window oppositeWindow, long serial) {
    Window actualFocusedWindow = XKeyboardFocusManagerPeer.getCurrentNativeFocusedWindow();

    // If the actual focused window is not this decorated window then retain it.
    if (actualFocusedWindow != null && actualFocusedWindow != target) {
      Window owner = XWindowPeer.getDecoratedOwner(actualFocusedWindow);

      if (owner != null && owner == target) {
        setActualFocusedWindow((XWindowPeer) ComponentAccessor.getPeer(actualFocusedWindow));
      }
    }
    super.handleWindowFocusOut(oppositeWindow, serial);
  }