Fixed a issue that MouseOver/LeaveAction loops infinitely.

http://www.rainmeter.net/forum/viewtopic.php?f=14&t=5560
This commit is contained in:
spx 2010-10-02 04:13:50 +00:00
parent 9da555a187
commit 54362780c3

View File

@ -3068,6 +3068,7 @@ LRESULT CMeterWindow::OnMouseMove(UINT uMsg, WPARAM wParam, LPARAM lParam)
MapWindowPoints(NULL, m_Window, &pos, 1);
}
while (DoMoveAction(pos.x, pos.y, MOUSE_LEAVE)) ;
while (DoMoveAction(pos.x, pos.y, MOUSE_OVER)) ;
// Handle buttons
@ -4256,6 +4257,8 @@ bool CMeterWindow::DoMoveAction(int x, int y, MOUSE mouse)
}
}
else
{
if (mouse == MOUSE_LEAVE)
{
if ((*j)->IsMouseOver())
{
@ -4283,6 +4286,7 @@ bool CMeterWindow::DoMoveAction(int x, int y, MOUSE mouse)
}
}
}
}
if (HitTest(x, y))
{
@ -4304,6 +4308,8 @@ bool CMeterWindow::DoMoveAction(int x, int y, MOUSE mouse)
}
}
else
{
if (mouse == MOUSE_LEAVE)
{
// Mouse leave happens when the mouse is outside the window
if (m_MouseOver)
@ -4319,6 +4325,7 @@ bool CMeterWindow::DoMoveAction(int x, int y, MOUSE mouse)
}
}
}
}
return false;
}