summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2019-10-16 18:51:38 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2019-10-16 18:51:38 +0300
commit410d25eed5fec7955337e0f91de8e09eabf00ed2 (patch)
treeb3f406c228e12161a408668eedef0b0254c5667e /indra
parent718bd55f686945c61cd903938a2ed508d653a6e3 (diff)
parent6ea01a8c4a0c8fd523c2f1dddb23659006ee042b (diff)
Downstream merge from lindenlab/viewer-serval
Diffstat (limited to 'indra')
-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")
{