summaryrefslogtreecommitdiff
path: root/indra/llplugin
diff options
context:
space:
mode:
authorAimee Linden <aimee@lindenlab.com>2010-04-25 03:49:55 +0100
committerAimee Linden <aimee@lindenlab.com>2010-04-25 03:49:55 +0100
commit0cdaca2b468bbc0f6d9e7f88bd7e39f8c7c04707 (patch)
tree9646dc6564aa9af25662b3aa2d068bc19c3d0129 /indra/llplugin
parentf7588522668cdf21d4eaf837a07ebbdc998fa6ef (diff)
DEV-49389 (SNOW-571 / VWR-18279): Replacing another deprecated WaitNextEvent() for the OS X 10.6 SDK
Replaced the deprecated WaitNextEvent() call with ReceiveNextEvent() and SendEventToEventTarget() as a basic event loop in slplugin.cpp
Diffstat (limited to 'indra/llplugin')
-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)