boolean (@NotNull Window window) { if (!(window instanceof Frame)) return false; if (SystemInfo.isMac) { if (window instanceof IdeFrame) { // we can't move focus to full-screen main frame, as it will be hidden behind other frame windows Project project = ((IdeFrame)window).getProject(); IdeFrame projectFrame = WindowManager.getInstance().getIdeFrame(project); if (projectFrame != null) { return !projectFrame.isInFullScreen(); } } } return true; }