if (subMenu != null && subMenu.isVisible()) {
Point xy = ce.getXY();
xy.x += XDOM.getBodyScrollLeft();
xy.y += XDOM.getBodyScrollTop();
Rectangle rec = subMenu.el().getBounds();
if ((subMenu.el() instanceof Layer)) {
Layer l = (Layer) subMenu.el();
if (l.isShim() && l.isShadow()) {
return !rec.contains(xy) && !l.getShadow().getBounds().contains(xy)
&& !l.getShim().getBounds().contains(xy);
} else if (l.isShadow()) {
return !rec.contains(xy) && !l.getShadow().getBounds().contains(xy);
} else if (l.isShim()) {
return !rec.contains(xy) && !l.getShim().getBounds().contains(xy);
}
}
return !rec.contains(xy);
}
}
return true;
}