summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2022-08-12 17:08:09 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2022-08-12 17:08:09 +0300
commitee3fe6f66a008c583d02c3d63dd39fcd527a65f4 (patch)
treed70a5942abb120476d26edd8901018432c615dab
parent1de8306c830611d22e9d684ad1372e6f506f21af (diff)
SL-17964 FIXED Pressing M while any floater has focus switches into mouselook
-rw-r--r--indra/newview/llviewerwindow.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index ebbc9c0681..ae9da97642 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -262,6 +262,8 @@ static const F32 MIN_UI_SCALE = 0.75f;
static const F32 MAX_UI_SCALE = 7.0f;
static const F32 MIN_DISPLAY_SCALE = 0.75f;
+static const char KEY_MOUSELOOK = 'M';
+
static LLCachedControl<std::string> sSnapshotBaseName(LLCachedControl<std::string>(gSavedPerAccountSettings, "SnapshotBaseName", "Snapshot"));
static LLCachedControl<std::string> sSnapshotDir(LLCachedControl<std::string>(gSavedPerAccountSettings, "SnapshotBaseDir", ""));
@@ -2879,6 +2881,13 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
if (keyboard_focus
&& !gFocusMgr.getKeystrokesOnly())
{
+ //Most things should fall through, but mouselook is an exception,
+ //don't switch to mouselook if any floater has focus
+ if ((key == KEY_MOUSELOOK) && !(mask & (MASK_CONTROL | MASK_ALT)))
+ {
+ return TRUE;
+ }
+
LLUICtrl* cur_focus = dynamic_cast<LLUICtrl*>(keyboard_focus);
if (cur_focus && cur_focus->acceptsTextInput())
{