diff options
Diffstat (limited to 'indra/llui/llscrollbar.cpp')
-rw-r--r-- | indra/llui/llscrollbar.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/indra/llui/llscrollbar.cpp b/indra/llui/llscrollbar.cpp index c21bbdcc75..f4aea3fa11 100644 --- a/indra/llui/llscrollbar.cpp +++ b/indra/llui/llscrollbar.cpp @@ -214,7 +214,7 @@ BOOL LLScrollbar::handleMouseDown(S32 x, S32 y, MASK mask) { // Start dragging the thumb // No handler needed for focus lost since this clas has no state that depends on it. - gFocusMgr.setMouseCapture( this, NULL ); + gFocusMgr.setMouseCapture( this ); mDragStartX = x; mDragStartY = y; mOrigRect.mTop = mThumbRect.mTop; @@ -255,7 +255,7 @@ BOOL LLScrollbar::handleHover(S32 x, S32 y, MASK mask) // because they'll capture the mouse whenever they need hover events. BOOL handled = FALSE; - if( gFocusMgr.getMouseCapture() == this ) + if( hasMouseCapture() ) { S32 height = mRect.getHeight(); S32 width = mRect.getWidth(); @@ -408,9 +408,9 @@ BOOL LLScrollbar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, BOOL LLScrollbar::handleMouseUp(S32 x, S32 y, MASK mask) { BOOL handled = FALSE; - if( gFocusMgr.getMouseCapture() == this ) + if( hasMouseCapture() ) { - gFocusMgr.setMouseCapture( NULL, NULL ); + gFocusMgr.setMouseCapture( NULL ); handled = TRUE; } else @@ -442,7 +442,7 @@ void LLScrollbar::draw() screenPointToLocal(cursor_pos_gl.mX, cursor_pos_gl.mY, &local_mouse_x, &local_mouse_y); BOOL other_captor = gFocusMgr.getMouseCapture() && gFocusMgr.getMouseCapture() != this; - BOOL hovered = mEnabled && !other_captor && (gFocusMgr.getMouseCapture() == this || mThumbRect.pointInRect(local_mouse_x, local_mouse_y)); + BOOL hovered = mEnabled && !other_captor && (hasMouseCapture() || mThumbRect.pointInRect(local_mouse_x, local_mouse_y)); if (hovered) { mCurGlowStrength = lerp(mCurGlowStrength, mHoverGlowStrength, LLCriticalDamp::getInterpolant(0.05f)); |