private bool MouseInControl (Control control, bool fuzzy) {
Point m;
Point c;
Size cw;
if (control == null) {
return false;
}
m = Control.MousePosition;
c = new Point(control.Bounds.X, control.Bounds.Y);
if (control.Parent != null) {
c = control.Parent.PointToScreen(c);
}
cw = control.ClientSize;
Rectangle rect = new Rectangle (c, cw);
//
// We won't get mouse move events on all platforms with the exact same
// frequency, so cheat a bit.
if (fuzzy)
rect.Inflate (2, 2);
return rect.Contains (m);
}