import com.intellij.openapi.ui.Divider;
import com.intellij.openapi.ui.Painter;
import com.intellij.openapi.ui.impl.GlassPaneDialogWrapperPeer;
-import com.intellij.openapi.ui.popup.Balloon;
-import com.intellij.openapi.ui.popup.JBPopupFactory;
import com.intellij.openapi.util.Disposer;
import com.intellij.openapi.util.Weighted;
import com.intellij.openapi.wm.IdeGlassPane;
return false;
}
- private MouseEvent myLastRedispatchedEvent = null;
-
private boolean preprocess(final MouseEvent e, final boolean motion, JRootPane eventRootPane) {
try {
final MouseEvent event = convertEvent(e, eventRootPane);
return false;
}
- Component c = SwingUtilities.getDeepestComponentAt(e.getComponent(), e.getX(), e.getY());
- Balloon balloon = JBPopupFactory.getInstance().getParentBalloonFor(c);
- if (balloon != null && myLastRedispatchedEvent != e) {
- if (e.getID() == MouseEvent.MOUSE_PRESSED
- && IdeTooltipManager.getInstance().hasCurrent()
- && IdeTooltipManager.getInstance().hideCurrent(event, null, null, false)) {
- //noinspection SSBasedInspection
- SwingUtilities.invokeLater(new Runnable() {
- @Override
- public void run() {
- myLastRedispatchedEvent = e;
- IdeEventQueue.getInstance().dispatchEvent(e);
- }
- });
- }
- return false;
- }
- myLastRedispatchedEvent = null;
-
for (EventListener each : mySortedMouseListeners) {
if (motion && each instanceof MouseMotionListener) {
fireMouseMotion((MouseMotionListener)each, event);