summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autobuild.xml14
-rw-r--r--indra/media_plugins/cef/media_plugin_cef.cpp39
2 files changed, 38 insertions, 15 deletions
diff --git a/autobuild.xml b/autobuild.xml
index 348b45675d..784d16b0a6 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -556,9 +556,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>ec71ffd68af829bf77fb03fdf39c2461</string>
+ <string>bbdea742f2a89bcd6360e61e01d6be93</string>
<key>url</key>
- <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/7820/30257/dullahan-1.1.813_3.3071.1637.gcb6cf75-darwin64-507809.tar.bz2</string>
+ <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/8207/32592/dullahan-1.1.820_3.3071.1637.gcb6cf75-darwin64-508196.tar.bz2</string>
</map>
<key>name</key>
<string>darwin64</string>
@@ -568,9 +568,9 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>234547cab68748f82e429237d5a46783</string>
+ <string>31e11a74e0d3f1e5e4036cb5fea8d944</string>
<key>url</key>
- <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/7822/30267/dullahan-1.1.813_3.3071.1634.g9cc59c8-windows-507809.tar.bz2</string>
+ <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/8209/32599/dullahan-1.1.820_3.3071.1634.g9cc59c8-windows-508196.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
@@ -580,16 +580,16 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>c3bcb52276cb115577e8c0cd053b8fc7</string>
+ <string>f965d244e7921c06ee79b68a4abcea3b</string>
<key>url</key>
- <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/7821/30264/dullahan-1.1.813_3.3071.1634.g9cc59c8-windows64-507809.tar.bz2</string>
+ <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/8208/32602/dullahan-1.1.820_3.3071.1634.g9cc59c8-windows64-508196.tar.bz2</string>
</map>
<key>name</key>
<string>windows64</string>
</map>
</map>
<key>version</key>
- <string>1.1.813_3.3071.1634.g9cc59c8</string>
+ <string>1.1.820_3.3071.1634.g9cc59c8</string>
</map>
<key>elfio</key>
<map>
diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp
index 796e262d6f..34a0931220 100644
--- a/indra/media_plugins/cef/media_plugin_cef.cpp
+++ b/indra/media_plugins/cef/media_plugin_cef.cpp
@@ -75,7 +75,7 @@ private:
void authResponse(LLPluginMessage &message);
void keyEvent(dullahan::EKeyEvent key_event, LLSD native_key_data);
- void unicodeInput(LLSD native_key_data);
+ void unicodeInput(std::string event, LLSD native_key_data);
void checkEditState();
void setVolume();
@@ -603,8 +603,9 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
}
else if (message_name == "text_event")
{
+ std::string event = message_in.getValue("event");
LLSD native_key_data = message_in.getValueLLSD("native_key_data");
- unicodeInput(native_key_data);
+ unicodeInput(event, native_key_data);
}
else if (message_name == "key_event")
{
@@ -742,9 +743,14 @@ void MediaPluginCEF::keyEvent(dullahan::EKeyEvent key_event, LLSD native_key_dat
U32 event_umodchars = native_key_data["event_umodchars"].asInteger();
bool event_isrepeat = native_key_data["event_isrepeat"].asBoolean();
- mCEFLib->nativeKeyboardEventOSX(key_event, event_modifiers,
- event_keycode, event_chars,
- event_umodchars, event_isrepeat);
+ // adding new code below in unicodeInput means we don't send ascii chars
+ // here too or we get double key presses on a mac.
+ if (((unsigned char)event_chars < 0x20 || (unsigned char)event_chars >= 0x7f ))
+ {
+ mCEFLib->nativeKeyboardEventOSX(key_event, event_modifiers,
+ event_keycode, event_chars,
+ event_umodchars, event_isrepeat);
+ }
#elif LL_WINDOWS
U32 msg = ll_U32_from_sd(native_key_data["msg"]);
U32 wparam = ll_U32_from_sd(native_key_data["w_param"]);
@@ -754,12 +760,29 @@ void MediaPluginCEF::keyEvent(dullahan::EKeyEvent key_event, LLSD native_key_dat
#endif
};
-void MediaPluginCEF::unicodeInput(LLSD native_key_data = LLSD::emptyMap())
+void MediaPluginCEF::unicodeInput(std::string event, LLSD native_key_data = LLSD::emptyMap())
{
#if LL_DARWIN
- // code to send keys here doesn't seem to be required for Darwin - in fact,
- // not having reliable key event type info here means we don't know what to send anyway
+ // i didn't think this code was needed for macOS but without it, the IME
+ // input in japanese (and likely others too) doesn't work correctly.
+ // see maint-7654
+ U32 event_modifiers = native_key_data["event_modifiers"].asInteger();
+ U32 event_keycode = native_key_data["event_keycode"].asInteger();
+ U32 event_chars = native_key_data["event_chars"].asInteger();
+ U32 event_umodchars = native_key_data["event_umodchars"].asInteger();
+ bool event_isrepeat = native_key_data["event_isrepeat"].asBoolean();
+
+ dullahan::EKeyEvent key_event = dullahan::KE_KEY_UP;
+ if (event == "down")
+ {
+ key_event = dullahan::KE_KEY_DOWN;
+ }
+
+ mCEFLib->nativeKeyboardEventOSX(key_event, event_modifiers,
+ event_keycode, event_chars,
+ event_umodchars, event_isrepeat);
#elif LL_WINDOWS
+ event = ""; // not needed here but prevents unused var warning as error
U32 msg = ll_U32_from_sd(native_key_data["msg"]);
U32 wparam = ll_U32_from_sd(native_key_data["w_param"]);
U64 lparam = ll_U32_from_sd(native_key_data["l_param"]);