summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinput.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2023-05-19 10:43:14 -0400
committerNat Goodspeed <nat@lindenlab.com>2023-05-19 10:43:14 -0400
commit7efe727f266af2119d4cd6e33fdd6c26636c1a24 (patch)
tree62cce6d78c94b58205ce43bebd693303488ddace /indra/newview/llviewerinput.cpp
parentffca94c0b89d9734fa16fde7751bd0e5785e5ea2 (diff)
parent5a70639b7992842a9f74ec81b11bac56608b8f2e (diff)
DRTVWR-558: Merge branch 'main' of secondlife/viewer into actions
Diffstat (limited to 'indra/newview/llviewerinput.cpp')
-rw-r--r--indra/newview/llviewerinput.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/llviewerinput.cpp b/indra/newview/llviewerinput.cpp
index 43b9cd90bd..6bab2c2100 100644
--- a/indra/newview/llviewerinput.cpp
+++ b/indra/newview/llviewerinput.cpp
@@ -1614,12 +1614,22 @@ BOOL LLViewerInput::handleMouse(LLWindow *window_impl, LLCoordGL pos, MASK mask,
clicktype = CLICK_DOUBLELEFT;
}
+ // If the first LMB click is handled by the menu, skip the following double click
+ static bool skip_double_click = false;
+ if (clicktype == CLICK_LEFT && down )
+ {
+ skip_double_click = handled;
+ }
if (double_click_sp && down)
{
// Consume click.
// Due to handling, double click that is not handled will be immediately followed by LMB click
}
+ else if (clicktype == CLICK_DOUBLELEFT && skip_double_click)
+ {
+ handled = true;
+ }
// If UI handled 'down', it should handle 'up' as well
// If we handle 'down' not by UI, then we should handle 'up'/'level' regardless of UI
else if (handled)