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
Родитель ef7317c6f3
Коммит 3637619bd4
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -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