From 1ebf5bca4896208347e5ac1492e88f6552363ed3 Mon Sep 17 00:00:00 2001 From: "Vassiliy.Kudryashov" Date: Mon, 23 Jan 2017 16:32:49 +0300 Subject: [PATCH] IDEA-166759 The cursor while over one ToolWindow sees another border toolwindow, located behind --- .../src/com/intellij/openapi/ui/ThreeComponentsSplitter.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/platform-api/src/com/intellij/openapi/ui/ThreeComponentsSplitter.java b/platform/platform-api/src/com/intellij/openapi/ui/ThreeComponentsSplitter.java index 9e537a852f90..b4c9cb64ac49 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/ThreeComponentsSplitter.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/ThreeComponentsSplitter.java @@ -35,6 +35,8 @@ import javax.swing.*; import java.awt.*; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; +import java.util.*; +import java.util.List; /** * @author Vladimir Kondratyev @@ -615,7 +617,8 @@ public class ThreeComponentsSplitter extends JPanel implements Disposable { if (window != null) { Point point = SwingUtilities.convertPoint(this, p, window); Component component = SwingUtilities.getDeepestComponentAt(window, point.x, point.y); - if (UIUtil.findParentByCondition(component, c -> c == ThreeComponentsSplitter.this) == null) return false; + List components = Arrays.asList(myFirstComponent, myFirstDivider, myInnerComponent, myLastDivider, myLastComponent); + if (UIUtil.findParentByCondition(component, c -> c != null && components.contains(c)) == null) return false; } int dndOff = myIsOnePixel ? JBUI.scale(Registry.intValue("ide.splitter.mouseZone")) / 2 : 0;