diff options
Diffstat (limited to 'indra/llwindow/llwindowmacosx.cpp')
-rw-r--r-- | indra/llwindow/llwindowmacosx.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
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; |