From ad4a87bb126a808add0a042fbb57cb4d3b43c595 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 22 Nov 2011 19:18:47 +0100 Subject: [PATCH] FIRE-3798 / VWR-27477: Cursor flashing on text entry & touchable objects --- indra/llui/lltooltip.cpp | 11 ++++++++++- indra/llui/llview.cpp | 20 +++++++++++++------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp index bc6461a0c2..9df7bd50f6 100644 --- a/indra/llui/lltooltip.cpp +++ b/indra/llui/lltooltip.cpp @@ -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; } diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 7218f32d9a..2ac96a8b43 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -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; + } // } return NULL;