Synthesize mouse move on NS_MOUSE_ENTER event so that mouse cursor and :hover state have a better chance of being correct on page load. b=301408 r+sr=roc a=bsmedberg

This commit is contained in:
dbaron%dbaron.org 2005-07-21 16:22:27 +00:00
parent 531457a0b0
commit 68373c1777

View File

@ -2178,6 +2178,8 @@ NS_IMETHODIMP nsViewManager::DispatchEvent(nsGUIEvent *aEvent, nsEventStatus *aS
printf("[vm=%p]setting mouse location to (%d,%d)\n",
this, mMouseLocation.x, mMouseLocation.y);
#endif
if (aEvent->message == NS_MOUSE_ENTER)
SynthesizeMouseMove(PR_FALSE);
} else if (aEvent->message == NS_MOUSE_EXIT) {
// Although we only care about the mouse moving into an area
// for which this view manager doesn't receive mouse move