summaryrefslogtreecommitdiff
path: root/indra/llplugin
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2019-11-27 23:20:03 +0200
committerAndreyL ProductEngine <alihatskiy@productengine.com>2019-11-27 23:20:03 +0200
commit56056aa198fc31a14cb4320762033958e96558cc (patch)
treed274000fb53dc1234cff8cddd8b3d3b756bf3681 /indra/llplugin
parent78bdf57ad6610b34389226bf941ba736ca0c2225 (diff)
parent191c1791f4f83fee1be6e71aa9e3f246206b2e80 (diff)
Upstream merge from viewer-neko
Diffstat (limited to 'indra/llplugin')
-rw-r--r--indra/llplugin/llpluginclassmedia.cpp4
-rw-r--r--indra/llplugin/llpluginclassmedia.h2
-rw-r--r--indra/llplugin/llpluginprocesschild.cpp7
3 files changed, 10 insertions, 3 deletions
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index 78b1483810..85197d1272 100644
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -664,12 +664,14 @@ bool LLPluginClassMedia::keyEvent(EKeyEventType type, int key_code, MASK modifie
return result;
}
-void LLPluginClassMedia::scrollEvent(int x, int y, MASK modifiers)
+void LLPluginClassMedia::scrollEvent(int x, int y, int clicks_x, int clicks_y, MASK modifiers)
{
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_MEDIA, "scroll_event");
message.setValueS32("x", x);
message.setValueS32("y", y);
+ message.setValueS32("clicks_x", clicks_x);
+ message.setValueS32("clicks_y", clicks_y);
message.setValue("modifiers", translateModifiers(modifiers));
sendMessage(message);
diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h
index 4f52afb317..9d11ee0421 100644
--- a/indra/llplugin/llpluginclassmedia.h
+++ b/indra/llplugin/llpluginclassmedia.h
@@ -118,7 +118,7 @@ public:
bool keyEvent(EKeyEventType type, int key_code, MASK modifiers, LLSD native_key_data);
- void scrollEvent(int x, int y, MASK modifiers);
+ void scrollEvent(int x, int y, int clicks_x, int clicks_y, MASK modifiers);
// enable/disable media plugin debugging messages and info spam
void enableMediaPluginDebugging( bool enable );
diff --git a/indra/llplugin/llpluginprocesschild.cpp b/indra/llplugin/llpluginprocesschild.cpp
index e24d222cb6..8fb3054eac 100644
--- a/indra/llplugin/llpluginprocesschild.cpp
+++ b/indra/llplugin/llpluginprocesschild.cpp
@@ -33,7 +33,7 @@
#include "llpluginmessagepipe.h"
#include "llpluginmessageclasses.h"
-static const F32 GOODBYE_SECONDS = 20.0f;
+static const F32 GOODBYE_SECONDS = 12.0f; // Do not set it to be bigger than mPluginLockupTimeout or parent will kill LLPluginProcessChild
static const F32 HEARTBEAT_SECONDS = 1.0f;
static const F32 PLUGIN_IDLE_SECONDS = 1.0f / 100.0f; // Each call to idle will give the plugin this much time.
@@ -218,6 +218,11 @@ void LLPluginProcessChild::idle(void)
if (mWaitGoodbye.hasExpired())
{
LL_WARNS() << "Wait for goodbye expired. Advancing to UNLOADED" << LL_ENDL;
+ if (mInstance != NULL)
+ {
+ // Something went wrong, at least make sure plugin will terminate
+ sendMessageToPlugin(LLPluginMessage("base", "force_exit"));
+ }
setState(STATE_UNLOADED);
}
break;