From c96713d2b14f6589b249f00c390ecb7ec17ce7c8 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sun, 20 Nov 2011 14:00:39 +0100 Subject: [PATCH] Proper fix for FIRE-3798: Cursor causing flickering when hovering over interactive objects --- indra/llui/llview.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 32135606da..2150dd6bb6 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -812,17 +812,24 @@ LLView* LLView::childrenHandleHover(S32 x, S32 y, MASK mask) } // This call differentiates this method from childrenHandleMouseEvent(). - // FIRE-3798: This call causes the cursor to flicker when - // the mouse is over a touchable object or in a text entry - // area. Commented out by Tank. + // Proper fix for FIRE-3798: Original fix by Tank caused + // cursor to not properly update when hovering over UI elements. + // 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)) + || blockMouseEventResult) { viewp->logMouseEvent(); return viewp; } + // } return NULL; }