diff options
author | Oz Linden <oz@lindenlab.com> | 2010-11-19 15:52:52 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2010-11-19 15:52:52 -0500 |
commit | 0f72f152e88efd7fc56cf6764f25bd2d0d4bf062 (patch) | |
tree | 7681f51b585d19910fa749dc4dbbc0ab4abe63fd /indra/newview/llviewerwindow.cpp | |
parent | daae74e569c0f0bc4ea822ac4127c1d8c21aa91f (diff) | |
parent | 1630bd4149cc8637f01eea82e4497dbf0d76b777 (diff) |
merge fix for STORM-616
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 743def4a0c..a7790243ed 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2266,6 +2266,20 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) return TRUE; } + // If "Pressing letter keys starts local chat" option is selected, we are not in mouselook, + // no view has keyboard focus, this is a printable character key (and no modifier key is + // pressed except shift), then give focus to nearby chat (STORM-560) + if ( gSavedSettings.getS32("LetterKeysFocusChatBar") && !gAgentCamera.cameraMouselook() && + !keyboard_focus && key < 0x80 && (mask == MASK_NONE || mask == MASK_SHIFT) ) + { + LLLineEditor* chat_editor = LLBottomTray::instanceExists() ? LLBottomTray::getInstance()->getNearbyChatBar()->getChatBox() : NULL; + if (chat_editor) + { + // passing NULL here, character will be added later when it is handled by character handler. + LLBottomTray::getInstance()->getNearbyChatBar()->startChat(NULL); + return TRUE; + } + } // give menus a chance to handle unmodified accelerator keys if ((gMenuBarView && gMenuBarView->handleAcceleratorKey(key, mask)) |