if (soContainer.getPropogation()) {
Point pt = control.toDisplay(event.x, event.y);
Composite composite = soContainer.getComposite();
Point relPt = composite.toControl(pt);
// mouse exit and enter happens on client area (not full widget area)
Rectangle bounds = composite.getClientArea();
if (bounds.contains(relPt)
&& composite.getDisplay().getActiveShell() != null) {
if (skinObject != null && (DEBUG || skinObject.isDebug())) {
System.out.println("skip " + skinObject
+ " because going into child");
}
return;
}
}
}
if (isExit && control.getParent() != null) {
// check if exiting and going into parent
Composite parent = control.getParent();
SWTSkinObject soParent = (SWTSkinObject) parent.getData("SkinObject");
if (soParent != null && (soParent instanceof SWTSkinObjectContainer)) {
SWTSkinObjectContainer container = (SWTSkinObjectContainer) soParent;
if (container.getPropogation()) {
Point pt = control.toDisplay(event.x, event.y);
Point relPt = container.getComposite().toControl(pt);
Rectangle bounds = parent.getClientArea();
if (bounds.contains(relPt)
&& parent.getDisplay().getActiveShell() != null) {
if (skinObject != null && (DEBUG || skinObject.isDebug())) {
System.out.println("skip " + skinObject
+ " because going into parent " + bounds + ";" + relPt + ";" + parent.getDisplay().getActiveShell());
}
// XXX Disabled for now as it doesn't always work
//return;
}
}
}
}
if (skinObject != null) {
String sSuffix = (event.type == eventOn) ? suffix : "";
if (skinObject != null && (DEBUG || skinObject.isDebug())) {
System.out.println(System.currentTimeMillis() + ": " + skinObject
+ "--" + sSuffix);
}
Point ptMouse = control.toDisplay(0, 0);
while (skinObject != null) {
Rectangle bounds = skinObject.getControl().getBounds();
Point pt = skinObject.getControl().toDisplay(0, 0);
bounds.x = pt.x;
bounds.y = pt.y;
if (bounds.contains(ptMouse)) {
skinObject.switchSuffix(sSuffix, 2, false, false);
skinObject = skinObject.getParent();
} else {
break;
}