Skip to content
Snippets Groups Projects
Commit cc0faa34 authored by Callum Prentice's avatar Callum Prentice
Browse files

Refrain from sending right mouse button events - crashes OS X - and we don't need them

parent 94ea5dce
No related branches found
No related tags found
No related merge requests found
...@@ -1536,11 +1536,11 @@ ...@@ -1536,11 +1536,11 @@
<key>archive</key> <key>archive</key>
<map> <map>
<key>hash</key> <key>hash</key>
<string>a58244a2348197aec11ac9f3dcf5c2ff</string> <string>bcc015c5943397b612da1cdc29df4340</string>
<key>hash_algorithm</key> <key>hash_algorithm</key>
<string>md5</string> <string>md5</string>
<key>url</key> <key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llceflib_3p-llceflib/rev/308140/arch/Darwin/installer/llceflib-1.4.0.308140-darwin-308140.tar.bz2</string> <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llceflib_3p-llceflib/rev/308183/arch/Darwin/installer/llceflib-1.4.0.308183-darwin-308183.tar.bz2</string>
</map> </map>
<key>name</key> <key>name</key>
<string>darwin</string> <string>darwin</string>
...@@ -1550,18 +1550,18 @@ ...@@ -1550,18 +1550,18 @@
<key>archive</key> <key>archive</key>
<map> <map>
<key>hash</key> <key>hash</key>
<string>880970d9fa0da5922044de5716d59043</string> <string>77d35679760ba467a90ca07b60877376</string>
<key>hash_algorithm</key> <key>hash_algorithm</key>
<string>md5</string> <string>md5</string>
<key>url</key> <key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llceflib_3p-llceflib/rev/308140/arch/CYGWIN/installer/llceflib-1.4.0.308140-windows-308140.tar.bz2</string> <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-llceflib_3p-llceflib/rev/308183/arch/CYGWIN/installer/llceflib-1.4.0.308183-windows-308183.tar.bz2</string>
</map> </map>
<key>name</key> <key>name</key>
<string>windows</string> <string>windows</string>
</map> </map>
</map> </map>
<key>version</key> <key>version</key>
<string>1.4.0.308140</string> <string>1.4.0.308183</string>
</map> </map>
<key>llphysicsextensions_source</key> <key>llphysicsextensions_source</key>
<map> <map>
......
...@@ -526,15 +526,13 @@ void MediaPluginCEF::receiveMessage(const char* message_string) ...@@ -526,15 +526,13 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
S32 x = message_in.getValueS32("x"); S32 x = message_in.getValueS32("x");
S32 y = message_in.getValueS32("y"); S32 y = message_in.getValueS32("y");
//std::string modifiers = message_in.getValue("modifiers"); // only even send left mouse button events to LLCEFLib
// (partially prompted by crash in OS X CEF when sending right button events)
// we catch the right click in viewer and display our own context menu anyway
S32 button = message_in.getValueS32("button"); S32 button = message_in.getValueS32("button");
LLCEFLib::EMouseButton btn = LLCEFLib::MB_MOUSE_BUTTON_LEFT; LLCEFLib::EMouseButton btn = LLCEFLib::MB_MOUSE_BUTTON_LEFT;
if (button == 0) btn = LLCEFLib::MB_MOUSE_BUTTON_LEFT;
if (button == 1) btn = LLCEFLib::MB_MOUSE_BUTTON_RIGHT;
if (button == 2) btn = LLCEFLib::MB_MOUSE_BUTTON_MIDDLE;
if (event == "down") if (event == "down" && button == 0)
{ {
mLLCEFLib->mouseButton(btn, LLCEFLib::ME_MOUSE_DOWN, x, y); mLLCEFLib->mouseButton(btn, LLCEFLib::ME_MOUSE_DOWN, x, y);
mLLCEFLib->setFocus(true); mLLCEFLib->setFocus(true);
...@@ -543,7 +541,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string) ...@@ -543,7 +541,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
str << "Mouse down at = " << x << ", " << y; str << "Mouse down at = " << x << ", " << y;
postDebugMessage(str.str()); postDebugMessage(str.str());
} }
else if (event == "up") else if (event == "up" && button == 0)
{ {
mLLCEFLib->mouseButton(btn, LLCEFLib::ME_MOUSE_UP, x, y); mLLCEFLib->mouseButton(btn, LLCEFLib::ME_MOUSE_UP, x, y);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment