public void remove(@NotNull IdeFrame frame) {
    if (!SystemInfoRt.isMac || !Registry.is("actionSystem.mouseGesturesEnabled", true)) {
      return;
    }

    try {
      Object listener = myListeners.get(frame);
      JComponent cmp = frame.getComponent();
      myListeners.remove(frame);
      if (listener != null && cmp != null && cmp.isShowing()) {
        ((MacGestureAdapter)listener).remove(cmp);
      }
    }
    catch (Throwable e) {
      LOG.debug(e);
    }
  }
public void remove(@NotNull IdeFrame frame)