From 4a6bacea0f8dcff959028f285bc533852da608b5 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Thu, 28 Aug 2008 23:57:41 +0000 Subject: merge viewer/viewer_1-21 94170-94770 -> release merge viewer/viewer_1-21-0 94830-95157 -> release Includes: QAR-786 Sandbox buildme for viewer + server Release Notes on the wiki! QAR-797 teleport failures (DEV-6198 / SVC-972) mergeme --- indra/llwindow/llwindowmacosx.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'indra/llwindow/llwindowmacosx.cpp') diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index 72623a17f2..56a8a6af40 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -264,6 +264,7 @@ LLWindowMacOSX::LLWindowMacOSX(const std::string& title, const std::string& name mWindowTitle[0] = title.length(); mEventHandlerUPP = NewEventHandlerUPP(staticEventHandler); + mMoveEventCampartorUPP = NewEventComparatorUPP(staticMoveEventComparator); mGlobalHandlerRef = NULL; mWindowHandlerRef = NULL; @@ -1487,6 +1488,7 @@ void LLWindowMacOSX::adjustCursorDecouple(bool warpingMouse) // llinfos << "adjustCursorDecouple: decoupling cursor" << llendl; CGAssociateMouseAndMouseCursorPosition(false); mCursorDecoupled = true; + FlushSpecificEventsFromQueue(GetCurrentEventQueue(), mMoveEventCampartorUPP, NULL); mCursorIgnoreNextDelta = TRUE; } } @@ -1914,6 +1916,23 @@ void LLWindowMacOSX::setupFailure(const std::string& text, const std::string& ca OSMessageBox(text, caption, type); } +pascal Boolean LLWindowMacOSX::staticMoveEventComparator( EventRef event, void* data) +{ + UInt32 evtClass = GetEventClass (event); + UInt32 evtKind = GetEventKind (event); + + if ((evtClass == kEventClassMouse) && ((evtKind == kEventMouseDragged) || (evtKind == kEventMouseMoved))) + { + return true; + } + + else + { + return false; + } +} + + pascal OSStatus LLWindowMacOSX::staticEventHandler(EventHandlerCallRef myHandler, EventRef event, void* userData) { LLWindowMacOSX *self = (LLWindowMacOSX*)userData; -- cgit v1.2.3