diff options
| author | Merov Linden <merov@lindenlab.com> | 2013-01-23 17:47:08 -0800 |
|---|---|---|
| committer | Merov Linden <merov@lindenlab.com> | 2013-01-23 17:47:08 -0800 |
| commit | a0112d6d78b17c5771b7b151d2fb9340bece3137 (patch) | |
| tree | 7c8f68933cc1c0b09af188b99cd391a3f540c320 /indra/newview/llviewerwindow.cpp | |
| parent | 46a74c4e01e19c07b5ee966ebe9882c4209dc89c (diff) | |
| parent | 0911dafd81b8360235eb6f6b85fac7153a5d4a02 (diff) | |
Pull merge with lindenlab/viewer-chui
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
| -rwxr-xr-x | indra/newview/llviewerwindow.cpp | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 2d5634a41d..36ddf26c82 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2503,22 +2503,14 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) return TRUE; } - LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::findTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"); + LLFloater* focused_floaterp = gFloaterView->getFocusedFloater(); + std::string focusedFloaterName = (focused_floaterp ? focused_floaterp->getInstanceName() : ""); - // Traverses up the hierarchy if( keyboard_focus ) { - if (nearby_chat) - { - LLChatEntry* chat_editor = nearby_chat->getChatBox(); - - // arrow keys move avatar while chatting hack - if (chat_editor && chat_editor->hasFocus()) + if ((focusedFloaterName == "nearby_chat") || (focusedFloaterName == "im_container") || (focusedFloaterName == "impanel")) { - // If text field is empty, there's no point in trying to move - // cursor with arrow keys, so allow movement - if (chat_editor->getText().empty() - || gSavedSettings.getBOOL("ArrowKeysAlwaysMove")) + if (gSavedSettings.getBOOL("ArrowKeysAlwaysMove")) { // let Control-Up and Control-Down through for chat line history, if (!(key == KEY_UP && mask == MASK_CONTROL) @@ -2540,7 +2532,6 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) break; } } - } } } @@ -2575,6 +2566,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) !keyboard_focus && key < 0x80 && (mask == MASK_NONE || mask == MASK_SHIFT) ) { // Initialize nearby chat if it's missing + LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::findTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"); if (!nearby_chat) { LLSD name("im_container"); |
