diff options
author | Monroe Linden <monroe@lindenlab.com> | 2010-01-18 17:58:12 -0800 |
---|---|---|
committer | Monroe Linden <monroe@lindenlab.com> | 2010-01-18 17:58:12 -0800 |
commit | fae9c8fe864278b20dfdb7caae3fbc50c779947b (patch) | |
tree | b85532991ef5ec3d87769aeab053c52918e36089 /indra/newview/llviewermedia.cpp | |
parent | 7590704e0e93b48f897c47dba07916efebd95274 (diff) |
Added getNativeKeyData() function to LLWindow and LLWindowMacOSX.
Added an LLSD argument to LLPluginClassMedia::keyEvent() and LLPluginClassMedia::textInput() which contains the native key data.
Made LLViewerMediaImpl retrieve the native key data and pass it to keyEvent and textInput.
Added a native_key_data parameter to the text_event and key_event messages.
Made the webkit plugin extract the native_key_data parameter and pass it to the internal keyEvent() and unicodeInput() functions.
Fixed LLMediaPluginTest to match function signature change to LLPluginClassMedia::keyEvent().
Diffstat (limited to 'indra/newview/llviewermedia.cpp')
-rw-r--r-- | indra/newview/llviewermedia.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index ef596f9297..86fbecf4fa 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -57,6 +57,7 @@ #include "llkeyboard.h" #include "llmutelist.h" //#include "llfirstuse.h" +#include "llwindow.h" #include <boost/bind.hpp> // for SkinFolder listener #include <boost/signals2.hpp> @@ -1824,9 +1825,12 @@ bool LLViewerMediaImpl::handleKeyHere(KEY key, MASK mask) if(!result) { - result = mMediaSource->keyEvent(LLPluginClassMedia::KEY_EVENT_DOWN ,key, mask); + + LLSD native_key_data = gViewerWindow->getWindow()->getNativeKeyData(); + + result = mMediaSource->keyEvent(LLPluginClassMedia::KEY_EVENT_DOWN ,key, mask, native_key_data); // Since the viewer internal event dispatching doesn't give us key-up events, simulate one here. - (void)mMediaSource->keyEvent(LLPluginClassMedia::KEY_EVENT_UP ,key, mask); + (void)mMediaSource->keyEvent(LLPluginClassMedia::KEY_EVENT_UP ,key, mask, native_key_data); } } @@ -1844,7 +1848,9 @@ bool LLViewerMediaImpl::handleUnicodeCharHere(llwchar uni_char) if (uni_char >= 32 // discard 'control' characters && uni_char != 127) // SDL thinks this is 'delete' - yuck. { - mMediaSource->textInput(wstring_to_utf8str(LLWString(1, uni_char)), gKeyboard->currentMask(FALSE)); + LLSD native_key_data = gViewerWindow->getWindow()->getNativeKeyData(); + + mMediaSource->textInput(wstring_to_utf8str(LLWString(1, uni_char)), gKeyboard->currentMask(FALSE), native_key_data); } } |