FIRE-3798 / VWR-27477: Cursor flashing on text entry & touchable objects

Ansariel 2011-11-22 19:18:47 +01:00
parent 05935d0912
commit ad4a87bb12
2 changed files with 23 additions and 8 deletions

View File

@ -328,11 +328,20 @@ BOOL LLToolTip::handleHover(S32 x, S32 y, MASK mask)
if(mInfoButton)
mInfoButton->setHighlight(true);
LLPanel::handleHover(x, y, mask);
// Ansariel - FIRE-3798:
// Don't call handleHover on the panel if we set the cursor ourself!
// It will traverse down the control hierarchy and finally the hover
// is handled by LLButton, that will set the cursor to UI_CURSOR_ARROW,
// resulting in a flickering cursor!
//LLPanel::handleHover(x, y, mask);
if (mHasClickCallback)
{
getWindow()->setCursor(UI_CURSOR_HAND);
}
else
{
LLPanel::handleHover(x, y, mask);
}
return TRUE;
}

View File

@ -817,18 +817,24 @@ LLView* LLView::childrenHandleHover(S32 x, S32 y, MASK mask)
// Fix resembles old algorithm for childrenHandleHover.
//LLUI::sWindow->setCursor(viewp->getHoverCursor());
BOOL blockMouseEventResult;
if ((blockMouseEventResult = viewp->blockMouseEvent(local_x, local_y)))
{
LLUI::sWindow->setCursor(viewp->getHoverCursor());
}
//if (viewp->handleHover(local_x, local_y, mask)
// || viewp->blockMouseEvent(local_x, local_y))
//{
// viewp->logMouseEvent();
// return viewp;
//}
if (viewp->handleHover(local_x, local_y, mask)
|| blockMouseEventResult)
if (viewp->handleHover(local_x, local_y, mask))
{
viewp->logMouseEvent();
return viewp;
}
if (viewp->blockMouseEvent(local_x, local_y))
{
LLUI::sWindow->setCursor(viewp->getHoverCursor());
return viewp;
}
// </Ansariel>
}
return NULL;