summaryrefslogtreecommitdiff
path: root/indra/llplugin/slplugin
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llplugin/slplugin')
-rw-r--r--indra/llplugin/slplugin/slplugin.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/llplugin/slplugin/slplugin.cpp b/indra/llplugin/slplugin/slplugin.cpp
index c18e2375f9..7d6dde1a58 100644
--- a/indra/llplugin/slplugin/slplugin.cpp
+++ b/indra/llplugin/slplugin/slplugin.cpp
@@ -255,6 +255,9 @@ int main(int argc, char **argv)
}
#endif
+#if LL_DARWIN
+ EventTargetRef event_target = GetEventDispatcherTarget();
+#endif
while(!plugin->isDone())
{
timer.reset();
@@ -262,8 +265,12 @@ int main(int argc, char **argv)
#if LL_DARWIN
{
// Some plugins (webkit at least) will want an event loop. This qualifies.
- EventRecord evt;
- WaitNextEvent(0, &evt, 0, NULL);
+ EventRef event;
+ if(ReceiveNextEvent(0, 0, kEventDurationNoWait, true, &event) == noErr)
+ {
+ SendEventToEventTarget (event, event_target);
+ ReleaseEvent(event);
+ }
// Check for a change in this process's frontmost window.
if(FrontWindow() != front_window)