diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2020-02-06 21:31:34 +0200 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2020-02-06 21:31:34 +0200 |
commit | fa39ff67f081e2e957d2ba7fd9f014747ff10963 (patch) | |
tree | dc67779842f2a670e5c242c07e24d27ec701f8d5 /indra/media_plugins | |
parent | 2076f4af0fc946c3bd79754a1deefc495ee7edb9 (diff) | |
parent | 9a3f1f6a3c4506ae08c7af7f92f11da40d80ef00 (diff) |
Merge branch 'master' into DRTVWR-497
Diffstat (limited to 'indra/media_plugins')
-rw-r--r-- | indra/media_plugins/cef/media_plugin_cef.cpp | 14 |
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") { |