private static Window @NotNull [] getWindows(@NotNull Window w) {
    if (SystemInfo.isMac && SystemInfo.isJetBrainsJvm && activatedWindows.size() > 1) {
      return activatedWindows.stream()
        .filter(window -> window == w || Foundation.invoke(MacUtil.getWindowFromJavaWindow(window), "isOnActiveSpace").booleanValue())
        .toArray(Window[]::new);
    }

    return activatedWindows.toArray(new Window[0]);
  }
private static Window @NotNull [] getWindows(@NotNull Window w)