summaryrefslogtreecommitdiff
path: root/indra/media_plugins
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2020-06-15 15:29:04 -0400
committerOz Linden <oz@lindenlab.com>2020-06-15 15:29:04 -0400
commit86009f885efc796850d3e5b612c896a9d737fb86 (patch)
tree404923800dbc6d09ea72b10de0c7f4bb103d1e62 /indra/media_plugins
parent17598f936bb6b099f21fc32aa80b68258cdfd0b9 (diff)
parent1702a65665879d0c68df4c6b4fdb60f815ab7abb (diff)
SL-10297: merge up to master at 6.4.3
Diffstat (limited to 'indra/media_plugins')
-rw-r--r--indra/media_plugins/cef/media_plugin_cef.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/indra/media_plugins/cef/media_plugin_cef.cpp b/indra/media_plugins/cef/media_plugin_cef.cpp
index d5a685e47f..cff21b13c4 100644
--- a/indra/media_plugins/cef/media_plugin_cef.cpp
+++ b/indra/media_plugins/cef/media_plugin_cef.cpp
@@ -660,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")
{