void (@NotNull Window ideFrame) { Component owner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner(); if (owner != null && ComponentUtil.findUltimateParent(owner) == ideFrame) { myLastFocusedAtDeactivation.put(ideFrame, owner); } }