Won't this hide the tooltip on any mouseout event? If someone puts a tooltip on a toolbar for instance, a mouseout event will fire every time someone moves the mouse out of an element.
>+ // filter out false win32 MouseMove event
> if (mMouseScreenX == newMouseX && mMouseScreenY == newMouseY)
>+ return NS_OK;
>+
>+ // filter out minor movements due to crappy optical mice and shaky hands
>+ // to prevent tooltips from hiding prematurely.
>+ nsCOMPtr<nsIContent> currentTooltip = do_QueryReferent(mCurrentTooltip);
>+
>+ if ((currentTooltip) &&
>+ (abs(mMouseScreenX - newMouseX) <= kTooltipMouseMoveTolerance) &&
>+ (abs(mMouseScreenY - newMouseY) <= kTooltipMouseMoveTolerance))
I don't see any reason to do this. Also, it won't work if someone moves the mouse slowly.
>+ // set a flag so that the tooltip is only displayed once until the mouse
>+ // leaves the node
>+ mTooltipShown = PR_TRUE;
The tooltip may not actually be shown though, if, for example, a popupshowing event prevents it or it's in a hidden tab. Better to do this at the end of LaunchTooltip where a check is done for the popup being open.
Comment on attachment 346420
Patch removing auto-hide timer so that tooltips hide on mousemove (with 7 pixel tolerance)
> NS_IMETHODIMP tener:: MouseOut( nsIDOMEvent* aMouseEvent) >Cancel( );
> nsXULTooltipLis
> {
...
> mTooltipTimer-
> mTooltipTimer = nsnull;
> return NS_OK;
>+ } else {
>+ HideTooltip();
> }
Won't this hide the tooltip on any mouseout event? If someone puts a tooltip on a toolbar for instance, a mouseout event will fire every time someone moves the mouse out of an element.
>+ // filter out false win32 MouseMove event nsIContent> currentTooltip = do_QueryReferen t(mCurrentToolt ip); veTolerance) && veTolerance) )
> if (mMouseScreenX == newMouseX && mMouseScreenY == newMouseY)
>+ return NS_OK;
>+
>+ // filter out minor movements due to crappy optical mice and shaky hands
>+ // to prevent tooltips from hiding prematurely.
>+ nsCOMPtr<
>+
>+ if ((currentTooltip) &&
>+ (abs(mMouseScreenX - newMouseX) <= kTooltipMouseMo
>+ (abs(mMouseScreenY - newMouseY) <= kTooltipMouseMo
I don't see any reason to do this. Also, it won't work if someone moves the mouse slowly.
>+ // set a flag so that the tooltip is only displayed once until the mouse
>+ // leaves the node
>+ mTooltipShown = PR_TRUE;
The tooltip may not actually be shown though, if, for example, a popupshowing event prevents it or it's in a hidden tab. Better to do this at the end of LaunchTooltip where a check is done for the popup being open.