From 0cdaca2b468bbc0f6d9e7f88bd7e39f8c7c04707 Mon Sep 17 00:00:00 2001 From: Aimee Linden Date: Sun, 25 Apr 2010 03:49:55 +0100 Subject: 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 --- indra/llplugin/slplugin/slplugin.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'indra/llplugin') 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) -- cgit v1.2.3