@Override public void mousePressed(final MouseEvent e) { if (UIUtil.isActionClick(e)) { if (e.getClickCount() == 1) { myActionClickCount = 0; } // clicks on the close window button don't count in determining whether we have a // double-click on tab (IDEA-70403) final Component deepestComponent = SwingUtilities.getDeepestComponentAt(e.getComponent(), e.getX(), e.getY()); if (!(deepestComponent instanceof InplaceButton)) { myActionClickCount++; } if (myActionClickCount == 2 && !isFloating()) { final ActionManager mgr = ActionManager.getInstance(); mgr.tryToExecute(mgr.getAction("HideAllWindows"), e, null, ActionPlaces.UNKNOWN, true); } } }