summaryrefslogtreecommitdiff
path: root/indra/media_plugins/cef/media_plugin_cef.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/media_plugins/cef/media_plugin_cef.cpp')
-rw-r--r--indra/media_plugins/cef/media_plugin_cef.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp
index eead92fd8e..cff21b13c4 100644
--- a/indra/media_plugins/cef/media_plugin_cef.cpp
+++ b/indra/media_plugins/cef/media_plugin_cef.cpp
@@ -241,6 +241,7 @@ void MediaPluginCEF::onRequestExitCallback()
LLPluginMessage message("base", "goodbye");
sendMessage(message);
+ // Will trigger delete on next staticReceiveMessage()
mDeleteMe = true;
}
@@ -437,9 +438,13 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
}
else if (message_name == "cleanup")
{
- mVolumeCatcher.setVolume(0);
+ mVolumeCatcher.setVolume(0); // Hack: masks CEF exit issues
mCEFLib->requestExit();
}
+ else if (message_name == "force_exit")
+ {
+ mDeleteMe = true;
+ }
else if (message_name == "shm_added")
{
SharedSegmentInfo info;
@@ -655,12 +660,18 @@ void MediaPluginCEF::receiveMessage(const char* message_string)
}
else if (message_name == "scroll_event")
{
- S32 x = message_in.getValueS32("x");
- S32 y = message_in.getValueS32("y");
+ // Mouse coordinates for cef to be able to scroll 'containers'
+ //S32 x = message_in.getValueS32("x");
+ //S32 y = message_in.getValueS32("y");
+ // Wheel's clicks
+ S32 delta_x = message_in.getValueS32("clicks_x");
+ S32 delta_y = message_in.getValueS32("clicks_y");
const int scaling_factor = 40;
- y *= -scaling_factor;
+ delta_x *= -scaling_factor;
+ delta_y *= -scaling_factor;
- mCEFLib->mouseWheel(x, y);
+ // mCEFLib->mouseWheel(x, y, delta_x, delta_y);
+ mCEFLib->mouseWheel(delta_x, delta_y);
}
else if (message_name == "text_event")
{