set(CURSOR);
boxToCursor.put(this, value);
Surface surface = getSurface();
- String tempcursor = surface.cursor;
- // FIXME
- //Move(surface.mousex, surface.mousey, surface.mousex, surface.mousey);
- if (surface.cursor != tempcursor) surface.syncCursor();
+ if (surface != null) {
+ String tempcursor = surface.cursor;
+ propagateDownward(null, null, false);
+ if (surface.cursor != tempcursor) surface.syncCursor();
+ }
}
private void setFill(Object value) throws JSExn {
int y = globalToLocalY(getSurface()._mousey);
boolean wasinside = test(MOUSEINSIDE);
boolean isinside = test(VISIBLE) && inside(x, y) && !obscured;
- if (!wasinside && isinside) { set(MOUSEINSIDE); putAndTriggerTrapsAndCatchExceptions("Enter", T); }
- if (wasinside && !isinside) { clear(MOUSEINSIDE); putAndTriggerTrapsAndCatchExceptions("Leave", T); }
+ if (!wasinside && isinside) {
+ set(MOUSEINSIDE);
+ putAndTriggerTrapsAndCatchExceptions("Enter", T);
+ }
+ if (isinside && test(CURSOR)) getSurface().cursor = (String)boxToCursor.get(this);
+ if (wasinside && !isinside) {
+ clear(MOUSEINSIDE);
+ putAndTriggerTrapsAndCatchExceptions("Leave", T);
+ }
boolean found = false;
if (wasinside || isinside)
} else try {
found = true;
child.clear(STOP_UPWARD_PROPAGATION);
- child.putAndTriggerTrapsAndCatchExceptions(name, value);
+ if (name != null) child.putAndTriggerTrapsAndCatchExceptions(name, value);
+ else child.propagateDownward(name, value, obscured);
} finally {
if (save_stop) child.set(STOP_UPWARD_PROPAGATION); else child.clear(STOP_UPWARD_PROPAGATION);
}
if (child.inside(x - child.x, y - child.y))
- if (name.equals("_Move")) obscured = true;
+ if (name != null && name.equals("_Move")) obscured = true;
else break;
}
if (!obscured && !found)
- if (!name.equals("_Move") || wasinside) putAndTriggerTrapsAndCatchExceptions(name.substring(1), value);
+ if ("_Move".equals(name) || wasinside)
+ if (name != null)
+ putAndTriggerTrapsAndCatchExceptions(name.substring(1), value);
}
private static int stringToColor(String s) {