summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/lltabcontainer.cpp8
-rw-r--r--indra/llui/lltabcontainer.h1
2 files changed, 8 insertions, 1 deletions
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index f15e9771c0..76b9e448a1 100644
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -605,6 +605,7 @@ BOOL LLTabContainer::handleMouseDown( S32 x, S32 y, MASK mask )
LLButton* tab_button = getTab(index)->mButton;
gFocusMgr.setMouseCapture(this);
tab_button->setFocus(TRUE);
+ mMouseDownTimer.start();
}
}
if (handled) {
@@ -653,7 +654,11 @@ BOOL LLTabContainer::handleHover( S32 x, S32 y, MASK mask )
handled = LLPanel::handleHover(x, y, mask);
}
- commitHoveredButton(x, y);
+ F32 drag_delay = 0.25f; // filter out clicks from dragging
+ if (mMouseDownTimer.getElapsedTimeF32() > drag_delay)
+ {
+ commitHoveredButton(x, y);
+ }
return handled;
}
@@ -699,6 +704,7 @@ BOOL LLTabContainer::handleMouseUp( S32 x, S32 y, MASK mask )
}
commitHoveredButton(x, y);
+ mMouseDownTimer.stop();
LLPanel* cur_panel = getCurrentPanel();
if (hasMouseCapture())
{
diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h
index 8f8cedb1b9..aa4a08c4ff 100644
--- a/indra/llui/lltabcontainer.h
+++ b/indra/llui/lltabcontainer.h
@@ -320,6 +320,7 @@ private:
LLUIColor mTabsFlashingColor;
S32 mTabIconCtrlPad;
bool mUseTabEllipses;
+ LLFrameTimer mMouseDownTimer;
};
#endif // LL_TABCONTAINER_H