private bool ProcessMouseMove(ref Message m)
{
// Is this message for a different window?
if (m.HWnd != _current.Handle)
{
// Convert the client position to screen point
Point screenPt = CommonHelper.ClientMouseMessageToScreenPt(m);
// Ask the current popup if it allows the mouse move
if (_current.AllowMouseMove(m, screenPt))
{
return(false);
}
// Ask each stacked entry if they allow the mouse move
VisualPopup[] popups = _stack.ToArray();
// Search from end towards the front, the last entry is the most recent 'Push'
for (int i = popups.Length - 1; i >= 0; i--)
{
if (!popups[i].IsDisposed)
{
if (popups[i].AllowMouseMove(m, screenPt))
{
return(false);
}
}
}
// No popup allows the mouse move, so suppress it
return(true);
}
else
{
return(false);
}
}