Bug 49273 - always set the hover state on content when we get a MOUSE_ENTER event. This prevents problems with some window managers that send MOUSE_LEAVE and MOUSE_ENTER events before ButtonPress events. r=saari, sr=blizzard.

This commit is contained in:
bryner%uiuc.edu 2001-01-06 05:58:47 +00:00
parent 9855a27e0a
commit 7b1af9e0fe
2 changed files with 18 additions and 0 deletions

View File

@ -1290,6 +1290,15 @@ nsEventStateManager::PostHandleEvent(nsIPresContext* aPresContext,
}
}
}
case NS_MOUSE_ENTER:
nsCOMPtr<nsIContent> targetContent;
if (mCurrentTarget) {
mCurrentTarget->GetContentForEvent(aPresContext, aEvent,
getter_AddRefs(targetContent));
SetContentState(targetContent, NS_EVENT_STATE_HOVER);
}
break;
}
//Reset target frame to null to avoid mistargetting after reentrant event

View File

@ -1290,6 +1290,15 @@ nsEventStateManager::PostHandleEvent(nsIPresContext* aPresContext,
}
}
}
case NS_MOUSE_ENTER:
nsCOMPtr<nsIContent> targetContent;
if (mCurrentTarget) {
mCurrentTarget->GetContentForEvent(aPresContext, aEvent,
getter_AddRefs(targetContent));
SetContentState(targetContent, NS_EVENT_STATE_HOVER);
}
break;
}
//Reset target frame to null to avoid mistargetting after reentrant event