diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-08-11 00:52:34 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-08-11 01:46:00 +0300 |
commit | f55821a6daad638110a7eb5b6b824f9f06220b51 (patch) | |
tree | 0141c2062059c4590b378b756d7690d7d91e8e60 /indra/newview | |
parent | ed14e35a0681b6094f764916dbd66474e38381ed (diff) |
SL-15791 CONTROL_ML_LBUTTON and CONTROL_LBUTTON were triggered simultaneously
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llviewerinput.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/indra/newview/llviewerinput.cpp b/indra/newview/llviewerinput.cpp index 1ca7d8024a..15cf0b05db 100644 --- a/indra/newview/llviewerinput.cpp +++ b/indra/newview/llviewerinput.cpp @@ -1550,11 +1550,16 @@ bool LLViewerInput::scanMouse(EMouseClickType click, EMouseState state) const MASK mask = gKeyboard->currentMask(TRUE); res = scanMouse(mMouseBindings[mode], mMouseBindings[mode].size(), click, mask, state); - // no user defined actions found or those actions can't handle the key/button, handle control if nessesary - // This will pass AGENT_CONTROL_LBUTTON_DOWN to server, no idea why it doesn't do mouselook variant _ML_ - // but it was set this way forever (moved as is from LLTool::handleMouseDown) so lots of scripts probably - // rely on this. - if (!res && mLMouseDefaultHandling[mode] && agent_control_lbutton.canHandle(click, KEY_NONE, mask)) + // No user defined actions found or those actions can't handle the key/button, handle control if nessesary + // + // Default handling for MODE_FIRST_PERSON is in LLToolCompGun::handleMouseDown, but only if + // leftButtonGrabbed() + // + // If not grabbed or not in mouse look, should pass AGENT_CONTROL_LBUTTON_DOWN to server + if (!res + && (mode != MODE_FIRST_PERSON || !gAgent.leftButtonGrabbed()) + && mLMouseDefaultHandling[mode] + && agent_control_lbutton.canHandle(click, KEY_NONE, mask)) { switch (state) { |