summaryrefslogtreecommitdiff
path: root/indra/media_plugins/cef
diff options
context:
space:
mode:
authorCallum Prentice <callum@lindenlab.com>2015-11-23 12:01:32 -0800
committerCallum Prentice <callum@lindenlab.com>2015-11-23 12:01:32 -0800
commitcc0faa34243047303c5cc066525e93c49bc5920d (patch)
tree60f719446cf43f52ba0667d469cac3d8683afb49 /indra/media_plugins/cef
parent94ea5dce50e97aa6ee7bd36790a995c9ae4dbeba (diff)
Refrain from sending right mouse button events - crashes OS X - and we don't need them
Diffstat (limited to 'indra/media_plugins/cef')
-rw-r--r--indra/media_plugins/cef/media_plugin_cef.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp
index c8a52ff5fe..77e6d35b11 100644
--- a/indra/media_plugins/cef/media_plugin_cef.cpp
+++ b/indra/media_plugins/cef/media_plugin_cef.cpp
@@ -526,15 +526,13 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
S32 x = message_in.getValueS32("x");
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");
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->setFocus(true);
@@ -543,7 +541,7 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
str << "Mouse down at = " << x << ", " << y;
postDebugMessage(str.str());
}
- else if (event == "up")
+ else if (event == "up" && button == 0)
{
mLLCEFLib->mouseButton(btn, LLCEFLib::ME_MOUSE_UP, x, y);