summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-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())
{