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 9215dff4a070..3df31fa81e07 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/ThreeComponentsSplitter.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/ThreeComponentsSplitter.java @@ -455,19 +455,27 @@ public class ThreeComponentsSplitter extends JPanel { } private boolean isInside(Point p) { + if (!isVisible()) return false; + if (myVerticalSplit) { - if (getHeight() > 0) { - return p.y >= 0 && p.y < getHeight(); - } else { - return p.y >= -myDividerZone / 2 && p.y <= myDividerZone / 2; + if (p.x >= 0 && p.x < getWidth()) { + if (getHeight() > 0) { + return p.y >= 0 && p.y < getHeight(); + } else { + return p.y >= -myDividerZone / 2 && p.y <= myDividerZone / 2; + } } } else { - if (getWidth() > 0) { - return p.x >= 0 && p.x < getWidth(); - } else { - return p.x >= -myDividerZone / 2 && p.x <= myDividerZone / 2; + if (p.y >= 0 && p.y < getHeight()) { + if (getWidth() > 0) { + return p.x >= 0 && p.x < getWidth(); + } else { + return p.x >= -myDividerZone / 2 && p.x <= myDividerZone / 2; + } } } + + return false; } private void init() { diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/IdeGlassPaneImpl.java b/platform/platform-impl/src/com/intellij/openapi/wm/impl/IdeGlassPaneImpl.java index 87938804d619..e6b386221a79 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/IdeGlassPaneImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/IdeGlassPaneImpl.java @@ -136,9 +136,14 @@ public class IdeGlassPaneImpl extends JPanel implements IdeGlassPaneEx, IdeEvent if (target != null) { if (myLastCursorComponent != target) { myLastCursorComponent = target; - myLastOriginalCursor = target.getCursor(); + if (target.isCursorSet()) { + myLastOriginalCursor = target.getCursor(); + } + } + + if (cursor != null && !cursor.equals(target.getCursor())) { + target.setCursor(cursor); } - target.setCursor(cursor); } getRootPane().setCursor(cursor);