All submissions to this site are governed by the Second Life Viewer Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.

Review Board 1.6.11

Welcome to the Second Life Viewer Code Review tool.
See the documentation on our wiki for how to use this site.

STORM-1713: Mouse pointer flickers when hovering over any active/clickable UI item

Review Request #521 - Created Nov. 23, 2011 and submitted

Ansariel Hiller Reviewers
viewer
STORM-1713 richard.linden
None viewer-development
The fix for the flickering mouse cursor consists of 2 parts:

The first part changes LLView::childrenHandleHover() so that the cursor is only set if the control itself is blocking the mouse event and not at every hierarchy level in the control hierarchy. If the cursor would be set at each level, it would cause a flicker in case the different controls set a different cursor. This change actually resembles the algorithm used prior the start of the flickering.

The second part changes LLToolTip::handleHover() and specifically handles flickering of the cursor while hovering over the "i"-button of a hovertip. The general call to LLPanel::handleHover() was changed to be only called if the tooltip itself does not set the cursor itself. Logging the calls to LLWindowWin32::setCursor() revealed that if the "i"-button on a hovertop is hovered with the cursor said method is called twice with different cursors alternatively. Checking the call stack further revealed that one call is coming from LLToolTip::handleHover() and the other one from LLButton::handleHover(). Latter gets invoked if LLPanel::handleHover() is called. Since nothing is really done here except setting the cursor to UI_CURSOR_ARROW only ti get then set to UI_CURSOR_HAND if LLPanel::handleHover() returns, it doesn't make sense to do invoke that method unless the cursor is not changed in the tooltip itself. So LLPanel::handleHover() is only invoked if the tooltip does not set the cursor itself, so that child controls should take care.
Testing was done by myself on Firestorm rev. 24073 (http://hg.phoenixviewer.com/phoenix-firestorm-lgpl/rev/bcc95de39ca9) on Windows 7 and Lance Corrimal on Dolphin Viewer. Apparently the fix works without any side-effects
Review request changed
Updated (Dec. 13, 2011, 7:11 a.m.)
  • changed from pending to submitted